npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

viva-logger

v2.0.7

Published

text logger

Downloads

2

Readme

Classes

Functions

Typedefs

Logger

(license MIT) text logger, full example - see example.js

Kind: global class

logger.path

{string}

Kind: instance property of Logger

logger.path_trace

{string}

Kind: instance property of Logger

logger.pipe_unnamed

{boolean}

Kind: instance property of Logger

logger.pipe_list

{string[]}

Kind: instance property of Logger

logger.write_to_file

{boolean}

Kind: instance property of Logger

logger.write_to_file

{boolean}

Kind: instance property of Logger

logger.init([path], [write_to_file], [write_to_console]) ⇒ string

initialization logger, set root path for storage text log files

Kind: instance method of Logger
Returns: string - full path name for storage text log files

| Param | Type | Description | | --- | --- | --- | | [path] | string | root path for text log files, if empty - set __dirname/log | | [write_to_file] | boolean | | | [write_to_console] | boolean | |

logger.turnOn([pipe], [log_this_command])

turn on logger

Kind: instance method of Logger

| Param | Type | Description | | --- | --- | --- | | [pipe] | string | logger pipe | | [log_this_command] | boolean | write to log event 'TURN_ON', default - false |

logger.turnOff([pipe], [log_this_command])

turn off logger

Kind: instance method of Logger

| Param | Type | Description | | --- | --- | --- | | [pipe] | string | logger pipe | | [log_this_command] | boolean | write to log event 'TURN_OFF', default - false |

logger.debug(message, [pipe], [trace_objects], [additional_param]) ⇒ type_write_result

save message as debug

Kind: instance method of Logger
Returns: type_write_result - result write debug

| Param | Type | Description | | --- | --- | --- | | message | string | message | | [pipe] | Array.<string> | string | logger pipe | | [trace_objects] | any | Array.<any> | trace object list | | [additional_param] | type_additional_param | Array.<type_additional_param> | additional params, contat to message |

logger.error(error, [pipe], [trace_objects], [additional_param]) ⇒ type_write_result

save message as error

Kind: instance method of Logger
Returns: type_write_result - result write error

| Param | Type | Description | | --- | --- | --- | | error | any | object error or error text | | [pipe] | string | Array.<string> | logger pipe | | [trace_objects] | any | Array.<any> | trace object list | | [additional_param] | type_additional_param | Array.<type_additional_param> | additional params, contat to message |

console_log(allow, text)

Kind: global function

| Param | Type | | --- | --- | | allow | boolean | | text | string |

console_error(allow, text)

Kind: global function

| Param | Type | | --- | --- | | allow | boolean | | text | string |

type_message

Kind: global typedef
Properties

| Name | Type | | --- | --- | | dd | Date | | type | string | | message | string | | message_core | string | | pipes | Array.<string> | | [trace_objects] | any | Array.<any> | | additional_params | Array.<type_additional_param> | | write_result | type_write_result |

type_write_result

Kind: global typedef
Properties

| Name | Type | Description | | --- | --- | --- | | debug_file | string | debug full file name | | error_file | string | error full file name | | trace_file | string | trace full file name |

type_additional_param

part message with format {key: value}

Kind: global typedef
Properties

| Name | Type | | --- | --- | | key | string | | value | string |

type_writefiles

Kind: global typedef

| Param | Type | Description | | --- | --- | --- | | files | Array.<type_writefiles> | | | [callback] | function | error |

Properties

| Name | Type | Description | | --- | --- | --- | | file_name | string | | | file_data | string | async write many files with one callback |