Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
log
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libs
log
Commits
f57ea359
Commit
f57ea359
authored
6 years ago
by
admin-sigmundd
Browse files
Options
Downloads
Patches
Plain Diff
Made Fabric to use multiple Instances
parent
f23b5f23
No related branches found
No related tags found
1 merge request
!1
Update index.test.js, examples/all-options.js, examples/log-to-file.js,...
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
README.md
+2
-1
2 additions, 1 deletion
README.md
index.js
+2
-1
2 additions, 1 deletion
index.js
samples/all-options.js
+3
-1
3 additions, 1 deletion
samples/all-options.js
samples/log-to-file.js
+3
-1
3 additions, 1 deletion
samples/log-to-file.js
samples/no-options.js
+3
-1
3 additions, 1 deletion
samples/no-options.js
with
13 additions
and
5 deletions
README.md
+
2
−
1
View file @
f57ea359
...
...
@@ -9,7 +9,8 @@ May Optional Log to A File and / or a Graylog-Server
## Usage
`const log = require('log')(options)`
`const Log = require('log')`
`let log = new Log(options)`
Note: The options Part may be omitted, as all parts are optional, but using the name is recommended, as without it, the folder-name will be used
...
...
This diff is collapsed.
Click to expand it.
index.js
+
2
−
1
View file @
f57ea359
module
.
exports
=
function
(
options
)
{
function
Log
(
options
)
{
this
.
moment
=
require
(
'
moment
'
)
this
.
path
=
require
(
'
path
'
)
this
.
fs
=
require
(
'
fs
'
)
...
...
@@ -68,3 +68,4 @@ module.exports = function (options) {
}
return
this
}
module
.
exports
=
Log
This diff is collapsed.
Click to expand it.
samples/all-options.js
+
3
−
1
View file @
f57ea359
const
log
=
require
(
'
../index.js
'
)({
const
Log
=
require
(
'
../index.js
'
)
let
log
=
new
Log
({
name
:
'
Sample-Application
'
,
hostname
:
'
test-server
'
})
...
...
This diff is collapsed.
Click to expand it.
samples/log-to-file.js
+
3
−
1
View file @
f57ea359
const
log
=
require
(
'
../index.js
'
)({
const
Log
=
require
(
'
../index.js
'
)
let
log
=
new
Log
({
name
:
'
Sample-File
'
,
file
:
'
file.log
'
})
...
...
This diff is collapsed.
Click to expand it.
samples/no-options.js
+
3
−
1
View file @
f57ea359
const
log
=
require
(
'
../index.js
'
)()
const
Log
=
require
(
'
../index.js
'
)
let
log
=
new
Log
()
log
.
info
(
'
This is an Information
'
)
log
.
warn
(
'
This is a Warning
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment