Skip to content

Commit

Permalink
Replace Splunk query reference with Lucene's, which is compatible to OS
Browse files Browse the repository at this point in the history
Since we're no longer using Splunk.
  • Loading branch information
filipewl committed Sep 19, 2023
1 parent 750d149 commit a7c921b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/service/logger/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,18 @@ export class Logger {

console.log(JSON.stringify(inflatedLog))

// Warn the developer how to retrieve the error in splunk
this.logSplunkQuery()
// Warn the developer how to retrieve the error in the logging service
this.logLoggingServiceQuery()
}

/**
* Logs splunk query so the developer can search for the errors in splunk.
* Logs query so the developer can search for the errors in the logging service.
* This function runs only once in the lifetime of the Logger class so we
* don't mess up with the developer's terminal
*/
private logSplunkQuery = () => {
private logLoggingServiceQuery = () => {
if (linked) {
const message = `Try this query at Splunk to retrieve error log: 'index=io_vtex_logs app="${app}" account=${this.account} workspace=${this.workspace} level=error OR level=warn'`
const message = `Try this query at the logging service to retrieve error log (index = io_vtex_logs): 'Attributes.app:${app} AND Attributes.account:${this.account} AND Attributes.workspace:${this.workspace} AND (Attributes.level:error OR Attributes.level:warn)'`
logOnceToDevConsole(message, LogLevel.Info)
}
}
Expand Down

0 comments on commit a7c921b

Please sign in to comment.