Debugging & Logging
Debug Mode
from globalmoo.client import Client
import logging
# Configure logging
logging.basicConfig(
level=logging.DEBUG,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
)
# Create client with debug mode
client = Client(debug=True)use GlobalMoo\Client;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Monolog\Formatter\LineFormatter;
// Create logger
$logger = new Logger('globalmoo');
// Configure handler
$handler = new StreamHandler('php://stdout', Logger::DEBUG);
$handler->setFormatter(new LineFormatter(
format: null,
dateFormat: null,
allowInlineLineBreaks: true,
ignoreEmptyContextAndExtra: true
));
$logger->pushHandler($handler);
// Create client with debug mode
$client = new Client(debug: true);Log Levels
Level
Description
Examples
Custom Logging
What Gets Logged
Log Output Example
Best Practices
Last updated