Last change
on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[6a3a178] | 1 | 'use strict'
|
---|
| 2 |
|
---|
| 3 | const fs = require('graceful-fs')
|
---|
| 4 | const path = require('path')
|
---|
| 5 |
|
---|
| 6 | const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '/../package.json')).toString())
|
---|
| 7 |
|
---|
| 8 | exports.VERSION = pkg.version
|
---|
| 9 |
|
---|
| 10 | exports.DEFAULT_PORT = process.env.PORT || 9876
|
---|
| 11 | exports.DEFAULT_HOSTNAME = process.env.IP || 'localhost'
|
---|
| 12 | exports.DEFAULT_LISTEN_ADDR = process.env.LISTEN_ADDR || '0.0.0.0'
|
---|
| 13 |
|
---|
| 14 | // log levels
|
---|
| 15 | exports.LOG_DISABLE = 'OFF'
|
---|
| 16 | exports.LOG_ERROR = 'ERROR'
|
---|
| 17 | exports.LOG_WARN = 'WARN'
|
---|
| 18 | exports.LOG_INFO = 'INFO'
|
---|
| 19 | exports.LOG_DEBUG = 'DEBUG'
|
---|
| 20 | exports.LOG_LOG = 'LOG'
|
---|
| 21 | exports.LOG_PRIORITIES = [
|
---|
| 22 | exports.LOG_DISABLE,
|
---|
| 23 | exports.LOG_ERROR,
|
---|
| 24 | exports.LOG_WARN,
|
---|
| 25 | exports.LOG_LOG,
|
---|
| 26 | exports.LOG_INFO,
|
---|
| 27 | exports.LOG_DEBUG
|
---|
| 28 | ]
|
---|
| 29 |
|
---|
| 30 | // Default patterns for the pattern layout.
|
---|
| 31 | exports.COLOR_PATTERN = '%[%d{DATE}:%p [%c]: %]%m'
|
---|
| 32 | exports.NO_COLOR_PATTERN = '%d{DATE}:%p [%c]: %m'
|
---|
| 33 |
|
---|
| 34 | // Default console appender
|
---|
| 35 | exports.CONSOLE_APPENDER = {
|
---|
| 36 | type: 'console',
|
---|
| 37 | layout: {
|
---|
| 38 | type: 'pattern',
|
---|
| 39 | pattern: exports.COLOR_PATTERN
|
---|
| 40 | }
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | exports.EXIT_CODE = '\x1FEXIT'
|
---|
Note:
See
TracBrowser
for help on using the repository browser.