Skip to content

Commit 0b171bd

Browse files
committed
remove the start command logs outdated info
1 parent 67b0e64 commit 0b171bd

File tree

2 files changed

+4
-49
lines changed

2 files changed

+4
-49
lines changed

template/customization/logging.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ description: "How to view logs from the template build"
44
icon: "eye"
55
---
66

7+
You can retrieve the build logs using the SDK.
8+
9+
## SDK
10+
711
The `onBuildLogs`/`on_build_logs` callback receives structured `LogEntry` objects with the following properties:
812

913
<CodeGroup dropdown>

template/customization/start-ready-command.mdx

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -12,55 +12,6 @@ The idea behind the start command feature is to lower the wait times for your us
1212

1313
You can see how it works [here](/template/how-it-works).
1414

15-
### Logs
16-
You can retrieve the start command's logs using the SDK during runtime.
17-
18-
<Note>
19-
These logs are the logs from the start command during the build phase.
20-
</Note>
21-
22-
<CodeGroup title="Check start command logs" isRunnable={false}>
23-
```js {{ language: 'js' }}
24-
import { Sandbox } from 'e2b'
25-
26-
// Spawn your custom sandbox
27-
const sandbox = await Sandbox.create({
28-
id: 'my-agent-sandbox',
29-
// If you specify onStderr and onStdout handlers when spawning the sandbox
30-
// you will see logs from the start command.
31-
onStderr: output => console.log("stderr", output.line), // $HighlightLine
32-
onStdout: output => console.log("stdout", output.line), // $HighlightLine
33-
})
34-
35-
// Close sandbox once done
36-
await sandbox.close()
37-
```
38-
39-
```python {{ language: 'python' }}
40-
from e2b import Sandbox
41-
42-
# Spawn your custom sandbox
43-
sandbox = Sandbox.create(
44-
id="my-agent-sandbox",
45-
# If you specify on_stderr and on_stdout handlers when spawning the sandbox
46-
# you will see logs from the start command.
47-
on_stderr=lambda output: print("stderr", output.line), # $HighlightLine
48-
on_stdout=lambda output: print("stdout", output.line), # $HighlightLine
49-
)
50-
51-
# Close sandbox once done
52-
sandbox.kill()
53-
```
54-
</CodeGroup>
55-
56-
Or you can use the CLI:
57-
58-
<CodeGroup isTerminalCommand>
59-
```bash {{ language: 'bash' }}
60-
e2b sandbox logs <sandbox-id>
61-
```
62-
</CodeGroup>
63-
6415
## Ready command
6516
The ready command allows you to specify a command that will determine **template sandbox** readiness before a [snapshot](/template/how-it-works) is created.
6617
It is executed in an infinite loop until it returns a successful **exit code&nbsp;0**.

0 commit comments

Comments
 (0)