Skip to content

Commit

Permalink
fix: undefined type logtail
Browse files Browse the repository at this point in the history
  • Loading branch information
harishdeivanayagam committed Jan 16, 2025
1 parent 73f6b62 commit ac8002d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions mockenv
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ REDIS_PASSWORD=[add your redis password]
REDIS_DB=[add your redis db in number ex "0"]
OPENAI_API_KEY=[add your openai api key]
LOGTAIL_TOKEN=[add your logtail token / or it defaults to console logging]
LOGTAIL_SOURCE_TOKEN=your_logtail_token_here
2 changes: 1 addition & 1 deletion src/lib/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class Logger {

constructor() {

const transports = process.env.LOGTAIL_TOKEN !== "" ?
const transports = process.env.LOGTAIL_TOKEN && process.env.LOGTAIL_TOKEN !== "" ?
new LogtailTransport(new Logtail(process.env.LOGTAIL_TOKEN || "")) :
new winston.transports.Console({
format: winston.format.combine(
Expand Down

0 comments on commit ac8002d

Please sign in to comment.