Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Modify the logs filtering

Tomas Valentae937aaaa5946
diff --git a/packages/cli/src/commands/sandbox/logs.ts b/packages/cli/src/commands/sandbox/logs.ts
index 00abef1c2..32d0c2dff 100644
--- a/packages/cli/src/commands/sandbox/logs.ts
+++ b/packages/cli/src/commands/sandbox/logs.ts
@@ -86,9 +86,9 @@ enum LogFormat {
}
const userLoggers = [
- 'filesystemSvc',
- 'filesystemSvc.dirWatcher',
- 'processSvc',
+ 'filesystem',
+ 'filesystem.dirWatcher',
+ 'process',
]
function cleanLogger(logger?: string) {
@@ -209,6 +209,8 @@ function printLog(timestamp: string, line: string, allowedLevel: LogLevel | unde
const log = JSON.parse(line)
let level = log['level'].toUpperCase()
+ log.logger = cleanLogger(log.logger)
+
if (!printAll && (!userLoggers.includes(log.logger) || !log.logger)) {
return
}
@@ -241,8 +243,6 @@ function printLog(timestamp: string, line: string, allowedLevel: LogLevel | unde
delete log['envID']
delete log['sandboxID']
- log.logger = cleanLogger(log.logger)
-
if (format === LogFormat.JSON) {
console.log(JSON.stringify({
timestamp: new Date(timestamp).toISOString(),