-
Notifications
You must be signed in to change notification settings - Fork 2.9k
src backend services log
KernelDeimos edited this page Jun 11, 2025
·
1 revision
Services all have a logger available at this.log
.
class MyService extends BaseService {
async init () {
this.log.info('Hello, Logger!');
}
}
There are multiple "log levels", similar to logrus
or other common logging
libraries.
class MyService extends BaseService {
async init () {
this.log.info('I\'m just a regular log.');
this.log.debug('I\'m only for developers.');
this.log.warn('It is statistically unlikely I will be awknowledged.');
this.log.error('Something is broken! Pay attention!');
this.log.noticeme('This will be noticed, unlike warnings. Use sparingly.');
this.log.system('I am a system event, like shutdown.');
this.log.tick('A periodic behavior like cache pruning is occurring.');
}
}
Log methods can take a second parameter, an object specifying fields.
class MyService extends BaseService {
async init () {
this.log.info('I have fields!', {
why: "why not",
random_number: 1, // chosen by coin toss, guarenteed to be random
});
}
}
This wiki is generated from the repository. Do not edit files the wiki.
You are reading documentation for Puter, an open-source high-level operating system.
Getting started with Puter on localhost is as simple as:
git clone https://github.com/HeyPuter/puter.git
npm install
npm run start
- Index (README.md)
- api drivers
- Group Endpoints
- Notification Endpoints
- Share Endpoints
- Type-Tagged Objects
- Comment Prefixes
- contributors vscode
- Local Email Testing
- Puter Extensions
- Repository Structure and Tooling
- Configuring Domains for Self-Hosted Puter
- Configuring Puter
- First Run Issues
- self_hosters config_values
- self_hosters support
- Self-Hosting Puter
- Backend Style
- Puter Backend - Directory Structure
- Puter Backend Boot Sequence
- Puter Kernel Moduels and Services
- Batch and Symlinks
- Metered Services and Cost Management
- Protected Apps and Subdomains
- Service Scripts
- Index (README.md)
- Configuring AI Services
- PuterAI API Request Examples
- src backend src modules puterai config
####### For Contributors