toshell
Simple text logger for node application. We create it for fast and beautiful logging.
- Beautiful logging.
- Light weight.
- Log caller file and line number.
- Create custom log type, then you can choose what you want to display at the moment without commenting out the line.
- Global settings also avaliable for your project scope and environment.
- Typescript Support
Change Log
v1.3.0
- Add color functionality (light weight)
v1.2.0
- Use default varialbe to access global instance
var toshell = default;//javascript
;//typescript
- Now you can create new instance of toshell for further preference modification without effect default instance via toshellInstance.newInstance()
TODO
- parse any object as pretty json format
- cli command line
- transfer log to web with interactive interface (json object viewer, filter, search)
Usage
var toshell = default;toshell;toshell;toshell;toshell;toshell;//log linetoshell; var { toshell;};; toshell;toshell;
Preference
Preference can set at any point of the application.
It's will apply to all usage afterwards, by default.
var toshell = default;toshell;
or
var toshell = default;toshell;
You can create local instance and change logging behavior
var toshell = default;//import default instancevar localToShell = toshell;//Orvar localToShell = toshell;//Copy configuration from current instance//use localToShelllocalToShell;
Playing around with preference
Try it yourself
var toshell = default;toshell;toshell;toshell;toshell; toshell; //create new instance of toshellvar localToShell = toshell; localToShell; localToShell;localToShell; localToShell;localToShell; toshell;localToShell;
Color Usage
Built-in color functionality (light-weight)
var toshell = default;//javascripttoshell;/*Here is the list of color you can use'_reset' |'txt_bright' |'txt_dim' |'txt_underscore' |'txt_blink' |'txt_reverse' |'txt_hidden' |'black' |'red' |'green' |'yellow' |'blue' |'magenta' |'cyan' |'white' |'bg_black' |'bg_red' |'bg_green' |'bg_yellow' |'bg_blue' |'bg_magenta' |'bg_cyan' |'bg_white' */