-
Notifications
You must be signed in to change notification settings - Fork 3
Logmectl
logmectl is the command-line client for the logme control server. It connects to a running process and sends runtime control commands: listing state, changing channel settings, changing levels, managing backends, and updating subsystem filters.
logmectl - control a running logme instance
Copyright (c) EFM Software
Usage:
logmectl -p <port> [-i <ip>] [--ssl] [--pass <password>] [--format text|json] <command...>
Options:
-p, --port PORT Connect to PORT
-i, --ip IP Connect to IP address (default: 127.0.0.1)
-s, --ssl Use TLS connection
--pass PASSWORD Send control password
--format text|json Response format
-h, --help Show this help
Run with "help" to see available commands.
If no command is specified after the connection options, the client sends help to the server.
The examples below assume that the application started a logme control server on port 7791, as shown by the DynamicControl example.
logmectl -p 7791 helpWhat happens:
-
logmectlconnects to127.0.0.1:7791 - it sends the
helpcommand - the running application returns the list of commands supported by its embedded control server
This is the first command to run when checking which runtime controls are available in the current build.
logmectl -p 7791 --format json subsystemWhat happens:
- the client asks the server to return the response in JSON format
- internally the command is sent as
format json subsystem - this is useful for scripts that need to parse the control-server response
logmectl -p 7791 backend --channel ch1 --add consoleWhat happens:
- the command targets channel
ch1 - a
consolebackend is added at runtime - subsequent messages routed to that channel can be printed to the console without restarting the application
logmectl -p 7791 channel --disable ch1
logmectl -p 7791 channel --enable ch1What happens:
- the first command disables channel
ch1 - the second command enables it again
- this can be used to reduce logging noise while debugging a running process
logmectl -p 7791 subsystem --unblock-reported
logmectl -p 7791 subsystem --report s1What happens:
-
--unblock-reportedallows subsystems that were reported by the running process -
--report s1reports subsystems1 - the exact effect depends on the current subsystem filtering mode and the server-side configuration
logmectl --ip 192.168.1.10 --port 7791 --ssl --pass secret helpWhat happens:
- the client connects to
192.168.1.10:7791 - TLS is used for the connection
- the password is sent to the control server before executing the command
logme — flexible runtime logging system
Home · Getting Started · Architecture · Output · Backends · Configuration
GitHub: https://github.com/efmsoft/logme
- Home
- Getting Started
- Why logme?
- Core Concepts
- Logging Macros
- Fatal Handling
- Crash Logging
- glog Compatibility
- C API
- Choosing Logging Macros
- Function tracing
- Trace Points
- Override Scopes
- Advanced Features
- Collapse Logging
- Feature Map
- Overview
- Console Backend
- Debugger Backend
- File Backend
- File Rotation & Retention
- Buffer Backend
- Ring Buffer Backend
- SharedFile Backend
- Callback Backend
- Windows Event Log Backend
- Custom Backends
- Runtime Control
- Configuration
- Configuration JSON
- Control Server
- Environment Control
- Control Policies
- Trace Points
- Message Filtering