tink

WebJar for tink

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

tink
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

tink
WebJar for tink
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/SzymonLisowiec/node-tink

Download tink

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/tink/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>tink</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/tink/
implementation 'org.webjars.npm:tink:1.0.2'
// https://jarcasting.com/artifacts/org.webjars.npm/tink/
implementation ("org.webjars.npm:tink:1.0.2")
'org.webjars.npm:tink:jar:1.0.2'
<dependency org="org.webjars.npm" name="tink" rev="1.0.2">
  <artifact name="tink" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='tink', version='1.0.2')
)
libraryDependencies += "org.webjars.npm" % "tink" % "1.0.2"
[org.webjars.npm/tink "1.0.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

tink

npm version npm downloads license

Lightweight helper to logging errors your project in node.js

Constructor

const Tink = require('tink');
var tink = new Tink(options);
  • options - object of configuration
    • bright - Colors brightening, true or false
    • showtime - Showing time of write line. Time format (below) or false
    • logfile - Saving logs to file. Path or false

Using

tink.success('Success!');  //green
tink.warn('Warning!');     //yellow
tink.warn('Error!');       //red
tink.note('Note.');        //white
tink.info('Information.'); //cyan
/*
Example line in console:
[2017-06-09 18:00:00] Success!
Example line in log file:
[success][2017-06-09 18:00:00] Success!
*/

var addons = ['ID#100', 'Mode: 1'];
tink.info('Hello World!', addons); //Show: [2017-06-09 18:00:00][ID#100][Mode: 1] Hello World!

Time formats

  • YYYY - Full year, e.g. 2017
  • YY - Year in two digits, e.g. 17
  • MM - Month, e.g. 07
  • DD - Full year, e.g. 20
  • hh - Hours, e.g. 17
  • mm - Minutes, e.g. 57
  • ss - Seconds, e.g. 32
  • ms - Milliseconds, e.g. 627
var tink = new Tink({
  showtime: 'hh:mm:ss.ms DD-MM-YYYY',
  logfile: 'YYYY-MM-DD hh_mm.log'
});

Versions

Version
1.0.2