Skip to content

Handler for py-logging which writes logging records to a WebSocket.

Notifications You must be signed in to change notification settings

jose-pleonasm/py-logging-websocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-logging-websocket

Handler for py-logging which writes logging records to a WebSocket.

Installation

npm install --save py-logging-websocket

Usage

var logging = require('py-logging');
var commonkit = require('py-logging/commonkit'); // JsonFormatter
var websocket = require('py-logging-websocket');

commonkit.install(logging);
websocket.install(logging);

var formatter = new logging.JsonFormatter();

var handler = new logging.WebSocketHandler({
	host: '127.0.0.1',
	port: 9030
});

handler.setFormatter(formatter);
logging.getLogger().addHandler(handler);

About

Handler for py-logging which writes logging records to a WebSocket.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published