All Projects β†’ loggin-js β†’ loggin-js

loggin-js / loggin-js

Licence: MIT License
πŸ“ Customizable and expandable logger for Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to loggin-js

winston-telegram
A Telegram transport for winston
Stars: ✭ 28 (+40%)
Mutual labels:  logger, logging-library, node-js
ratlog.js
πŸ€ Ratlog JavaScript library - Application Logging for Rats, Humans and Machines
Stars: ✭ 24 (+20%)
Mutual labels:  logger, logging-library
Simple-Log
dnkpp.github.io/Simple-Log/
Stars: ✭ 13 (-35%)
Mutual labels:  logger, logging-library
Flogs
An Advanced Logging Framework develop in flutter that provides quick & simple logging solution.
Stars: ✭ 158 (+690%)
Mutual labels:  logger, logging-library
l
Cross-platform html/io [L]ogger with simple API.
Stars: ✭ 26 (+30%)
Mutual labels:  logger, logging-library
sqlite micro logger arduino
Fast and Lean Sqlite database logger for Microcontrollers
Stars: ✭ 128 (+540%)
Mutual labels:  logger, logging-library
KmLogging
Kotlin multiplatform logging. High performance, composable and simple to use.
Stars: ✭ 21 (+5%)
Mutual labels:  logger, logging-library
RxLogs
An Android & Kotlin Reactive Advanced Logging Framework.
Stars: ✭ 12 (-40%)
Mutual labels:  logger, logging-library
ptkdev-logger
πŸ¦’ Beautiful Logger for Node.js: the best alternative to the console.log statement
Stars: ✭ 117 (+485%)
Mutual labels:  logger, node-js
BLogger
An easy to use modern C++14/17 async cross-platform logger which supports custom formatting/patterns, colored output, Unicode, file logging, log rotation & more!
Stars: ✭ 23 (+15%)
Mutual labels:  logger, logging-library
use-reducer-logger
A very basic logger for the useReducer function in the React Hooks API.
Stars: ✭ 89 (+345%)
Mutual labels:  logger, logging-library
noodlog
🍜 Parametrized JSON logging library in Golang which lets you obfuscate sensitive data and marshal any kind of content.
Stars: ✭ 42 (+110%)
Mutual labels:  logger, logging-library
clue
a extremely high performance log library for android. ι«˜ζ€§θƒ½ηš„Androidζ—₯εΏ—εΊ“
Stars: ✭ 27 (+35%)
Mutual labels:  logger, logging-library
beautiful logger
Yet another logger API in Java with beautiful features
Stars: ✭ 60 (+200%)
Mutual labels:  logger, logging-library
winston-dev-console
Winston@3 console format aimed to improve development UX
Stars: ✭ 88 (+340%)
Mutual labels:  logger, node-js
Loggaby
πŸ“ A simple, lightweight and customizable logger.
Stars: ✭ 20 (+0%)
Mutual labels:  logger, logging-library
moesif-nodejs
Moesif Nodejs Middleware Library (formerly Moesif-Express)
Stars: ✭ 36 (+80%)
Mutual labels:  logger, logging-library
LogDNA-Android-Client
Android client for LogDNA
Stars: ✭ 22 (+10%)
Mutual labels:  logger, logging-library
JJSwiftLog
Swift log library for all platform
Stars: ✭ 51 (+155%)
Mutual labels:  logger, logging-library
react-native-logger
Async aware logger for react-native with grouping and filter feature
Stars: ✭ 20 (+0%)
Mutual labels:  logger, filter

NPM Version Downloads Dependencies Known Vulnerabilities
NPM Package Quality NPM Package Size All Contributors

An easy and customizable logger for NodeJS and the Browser.
If you want to log easily or create some complex loggin system, this might be the tool for you!


πŸ”§ Demo πŸ““ Wiki
πŸ”— Logger πŸ”— Notifier πŸ”— Log πŸ”— Severity πŸ”— Formatter
πŸ”— .logger πŸ”— .notifier πŸ”— .severity πŸ”— .formatter


News

  • Browser support is beeing deprecated, development will be discontinued and will be removed from Loggin'JS in version 2.0.0. It's beeing deprecated because it's limiting me on the features I could be adding to the NodeJS version.

Table Of Content

Usefull links:

Installing

$ npm i loggin-js
# or
$ yarn add loggin-js

Importing

const loggin = require('loggin-js');
// Or
import * as loggin from 'loggin-js';

Browser

!! NOTICE !!

Loggin'JS can be used in the browser, but it's still in it's early stages, and the API may change or have errors.

It is also limited. For now, only the console notifier works. Color is not working either!

<!-- Import from node_modules -->
<script src="node_modules/loggin-js/dist/loggin.js"></script>

<script>
  LogginJS.logger();
</script>

You can also use a CDN:

<script src="https://cdn.jsdelivr.net/npm/loggin-js@latest/dist/loggin.js"></script>

Getting Started

The default logger is the simplest way to use Loggin'JS.

loggin.debug(
  'Check this log out!!',
  { foo: 'var' },
  { channel: 'my-logger' }
);

Example Output 1

Additionaly you can create a custom logger:

const logger = loggin.logger({
  level: loggin.severity('info'), // Will output only info level and below
  channel: 'demo-1',
  formatter: 'long',
});

logger.user('Jhon');
logger.color(true);

logger.debug('Debug message, will not output');
logger.info('Info message, will output');

// You can override options when executing .log or any default methods (ie: debug, info, etc...)
logger.error('There was an <%rERROR>', null, { user: 'Bob' });

You can also log to a file:

const logger = loggin.logger('file');
logger.channel('my-logger');

logger.getNotifier('file').pipe(loggin.pipe('DEBUG', './debug.log'));

loggin.debug('Check this log out!!', { foo: 'var' });

Or output log in JSON format:

const logger = loggin.logger({
  formatter: 'json',
});

logger.error('this is an error');

There are a couple of default Notifiers available:

  • NodeJS: file, console, http, memory
  • Browser: console, http

Chek out the wiki for a more detailed guide.

back to top


Examples

Here are some usage examples:

If you want to add an example or find some error, leave an issue or send in a PR.

Plugins

Coming:

  • Telegram
  • Mail - maybe?
  • Sentry, and similar
  • ...

Coverage

Coverage Coverage Coverage Coverage

Contributing

First off, thank you for considering contributing to Loggin'JS.

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests. There is also a public slack channel available.

Contributors ✨

Initial work by nombrekeff

Thanks goes to these wonderful people (emoji key):


Manolo Edge

πŸ’» πŸ€” 🚧 ⚠️

Floki

πŸ“–

This project follows the all-contributors specification. Contributions of any kind welcome!

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].