Structured logging
Your Runnable code can log to Atmo's structured output using the logging methods.
For Rust, these methods are available under the log module, for example log::info(). For Swift, they are prefixed with Log, for example Suborbital.LogInfo() For TypeScript/AssemblyScript, they are prefixed with log, for example import { logInfo } from '@suborbital/suborbital'
The following namespace methods are available:

Info

Logs the message with the 'info' level:
Rust:
1
pub fn info(msg: &str)
Copied!
AssemblyScript:
1
function logInfo(msg: string): void
Copied!
Swift:
1
public func LogInfo(msg: String)
Copied!

Warn

Logs the message with the 'warn' level:
Rust:
1
pub fn warn(msg: &str)
Copied!
AssemblyScript:
1
function logWarn(msg: string): void
Copied!
Swift:
1
public func LogWarn(msg: String)
Copied!

Error

Logs the message with the 'err' level:
Rust:
1
pub fn error(msg: &str)
Copied!
AssemblyScript:
1
function logErr(msg: string): void
Copied!
Swift:
1
public func LogErr(msg: String)
Copied!
Last modified 10d ago
Export as PDF
Copy link