Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: log4js-node/log4js-node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6c21e4acd90047525d34ac4f4740e8ee0dba3bc2
Choose a base ref
...
head repository: log4js-node/log4js-node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9fdbed5ad45d1b09b35c1ef5355ba726b60cb702
Choose a head ref
Loading
Showing with 19,323 additions and 10,076 deletions.
  1. +0 −12 .bob.json
  2. +29 −0 .editorconfig
  3. +1 −0 .eslintignore
  4. +19 −0 .eslintrc
  5. +21 −0 .gitattributes
  6. +70 −0 .github/workflows/codeql-analysis.yml
  7. +32 −0 .github/workflows/node.js.yml
  8. +38 −0 .github/workflows/npm-publish.yml
  9. +21 −0 .gitignore
  10. +0 −15 .jshintrc
  11. +19 −0 .npmignore
  12. +9 −5 .travis.yml
  13. +191 −0 CHANGELOG.md
  14. +78 −101 README.md
  15. +19 −0 SECURITY.md
  16. +2 −0 docs/Gemfile
  17. +2 −0 docs/_config.yml
  18. +74 −0 docs/_layouts/default.html
  19. +45 −0 docs/api.md
  20. +88 −0 docs/appenders.md
  21. +29 −0 docs/assets/css/style.scss
  22. +55 −0 docs/categories.md
  23. +47 −0 docs/categoryFilter.md
  24. +28 −0 docs/clustering.md
  25. +116 −0 docs/connect-logger.md
  26. +18 −0 docs/console.md
  27. +8 −0 docs/contrib-guidelines.md
  28. +9 −0 docs/contributors.md
  29. +72 −0 docs/dateFile.md
  30. +70 −0 docs/faq.md
  31. +71 −0 docs/file.md
  32. +47 −0 docs/fileSync.md
  33. +57 −0 docs/index.md
  34. +212 −0 docs/layouts.md
  35. +28 −0 docs/logLevelFilter.md
  36. +63 −0 docs/migration-guide.md
  37. +53 −0 docs/multiFile.md
  38. +43 −0 docs/multiprocess.md
  39. +58 −0 docs/noLogFilter.md
  40. +35 −0 docs/recording.md
  41. +17 −0 docs/stderr.md
  42. +16 −0 docs/stdout.md
  43. +23 −0 docs/tcp-server.md
  44. +24 −0 docs/tcp.md
  45. +13 −0 docs/terms.md
  46. +27 −0 docs/v3-changes.md
  47. +13 −0 docs/webpack.md
  48. +77 −0 docs/writing-appenders.md
  49. +24 −0 examples/cluster.js
  50. +20 −0 examples/custom-layout.js
  51. +20 −0 examples/date-file-rolling.js
  52. +31 −28 examples/example-connect-logger.js
  53. +41 −38 examples/example-socket.js
  54. +33 −46 examples/example.js
  55. +19 −18 examples/flush-on-exit.js
  56. +9 −11 examples/fromreadme.js
  57. +31 −29 examples/hipchat-appender.js
  58. +13 −0 examples/layouts.js
  59. +31 −0 examples/log-rolling-bug.js
  60. +22 −22 examples/log-rolling.js
  61. +37 −0 examples/log-to-files.js
  62. +15 −14 examples/logFaces-appender.js
  63. +20 −18 examples/loggly-appender.js
  64. +26 −0 examples/logstashHTTP.js
  65. +22 −21 examples/logstashUDP.js
  66. +31 −31 examples/memory-test.js
  67. +18 −17 examples/patternLayout-tokens.js
  68. +26 −0 examples/pm2.js
  69. +9 −0 examples/pm2.json
  70. +49 −0 examples/rabbitmq-appender.js
  71. +45 −0 examples/redis-appender.js
  72. +21 −19 examples/slack-appender.js
  73. +33 −33 examples/smtp-appender.js
  74. +22 −0 examples/stacktrace.js
  75. +80 −0 lib/LoggingEvent.js
  76. +44 −0 lib/appenders/adapters.js
  77. +9 −10 lib/appenders/categoryFilter.js
  78. +0 −153 lib/appenders/clustered.js
  79. +7 −10 lib/appenders/console.js
  80. +51 −60 lib/appenders/dateFile.js
  81. +91 −83 lib/appenders/file.js
  82. +133 −120 lib/appenders/fileSync.js
  83. +0 −155 lib/appenders/gelf.js
  84. +0 −90 lib/appenders/hipchat.js
  85. +136 −0 lib/appenders/index.js
  86. +0 −71 lib/appenders/logFacesAppender.js
  87. +10 −16 lib/appenders/logLevelFilter.js
  88. +0 −90 lib/appenders/loggly.js
  89. +0 −68 lib/appenders/logstashUDP.js
  90. +0 −43 lib/appenders/mailgun.js
  91. +83 −0 lib/appenders/multiFile.js
  92. +115 −65 lib/appenders/multiprocess.js
  93. +43 −0 lib/appenders/noLogFilter.js
  94. +29 −0 lib/appenders/recording.js
  95. +0 −44 lib/appenders/slack.js
  96. +0 −152 lib/appenders/smtp.js
  97. +5 −9 lib/appenders/stderr.js
  98. +17 −0 lib/appenders/stdout.js
  99. +52 −0 lib/appenders/tcp-server.js
  100. +88 −0 lib/appenders/tcp.js
  101. +214 −0 lib/categories.js
  102. +103 −0 lib/clustering.js
  103. +59 −0 lib/configuration.js
  104. +220 −180 lib/connect-logger.js
  105. +0 −74 lib/date_format.js
  106. +0 −15 lib/debug.js
  107. +188 −179 lib/layouts.js
  108. +138 −54 lib/levels.js
  109. +114 −447 lib/log4js.js
  110. +0 −7 lib/log4js.json
  111. +115 −99 lib/logger.js
  112. +0 −94 lib/streams/BaseRollingFileStream.js
  113. +0 −91 lib/streams/DateRollingFileStream.js
  114. +0 −117 lib/streams/RollingFileStream.js
  115. +0 −3 lib/streams/index.js
  116. +6,306 −0 package-lock.json
  117. +73 −11 package.json
  118. +11 −0 test/.eslintrc
  119. +0 −84 test/categoryFilter-test.js
  120. +0 −166 test/clusteredAppender-test.js
  121. +0 −149 test/configuration-test.js
  122. +0 −173 test/configureNoLevels-test.js
  123. +0 −303 test/connect-logger-test.js
  124. +0 −33 test/consoleAppender-test.js
  125. +0 −223 test/dateFileAppender-test.js
  126. +0 −58 test/date_format-test.js
  127. +0 −72 test/debug-test.js
  128. +0 −442 test/fileAppender-test.js
  129. +0 −185 test/fileSyncAppender-test.js
  130. +0 −257 test/gelfAppender-test.js
  131. +0 −121 test/global-log-level-test.js
  132. +0 −112 test/hipchatAppender-test.js
  133. +0 −330 test/layouts-test.js
  134. +0 −464 test/levels-test.js
  135. +0 −77 test/log-abspath-test.js
  136. +0 −96 test/logFacesAppender-test.js
  137. +0 −93 test/logLevelFilter-test.js
  138. +0 −81 test/logger-test.js
  139. +0 −636 test/logging-test.js
  140. +0 −110 test/logglyAppender-test.js
  141. +0 −126 test/logstashUDP-test.js
  142. +0 −190 test/mailgunAppender-test.js
  143. +0 −317 test/multiprocess-test.js
  144. +12 −0 test/multiprocess-worker.js
  145. +0 −138 test/newLevel-test.js
  146. +0 −297 test/nolog-test.js
  147. +0 −340 test/reloadConfiguration-test.js
  148. +13 −0 test/sandbox-coverage.js
  149. +0 −100 test/setLevel-asymmetry-test.js
  150. +0 −168 test/slackAppender-test.js
  151. +0 −318 test/smtpAppender-test.js
  152. +0 −35 test/stderrAppender-test.js
  153. +0 −93 test/streams/BaseRollingFileStream-test.js
  154. +0 −227 test/streams/DateRollingFileStream-test.js
  155. +0 −207 test/streams/rollingFileStream-test.js
  156. +0 −86 test/subcategories-test.js
  157. +80 −0 test/tap/LoggingEvent-test.js
  158. +114 −0 test/tap/appender-dependencies-test.js
  159. +73 −0 test/tap/categoryFilter-test.js
  160. +100 −0 test/tap/cluster-test.js
  161. +330 −0 test/tap/configuration-inheritance-test.js
  162. +103 −0 test/tap/configuration-test.js
  163. +447 −0 test/tap/configuration-validation-test.js
  164. +124 −0 test/tap/connect-context-test.js
  165. +415 −0 test/tap/connect-logger-test.js
  166. +353 −0 test/tap/connect-nolog-test.js
  167. +60 −0 test/tap/consoleAppender-test.js
  168. +192 −0 test/tap/dateFileAppender-test.js
  169. +46 −0 test/tap/default-settings-test.js
  170. +57 −0 test/tap/disable-cluster-test.js
  171. +19 −0 test/tap/dummy-appender.js
  172. +80 −0 test/tap/file-descriptor-leak-test.js
  173. +132 −0 test/tap/file-sighup-test.js
  174. +389 −0 test/tap/fileAppender-test.js
  175. +285 −0 test/tap/fileSyncAppender-test.js
  176. +834 −0 test/tap/layouts-test.js
  177. +12 −0 test/tap/levels-before-configure-test.js
  178. +440 −0 test/tap/levels-test.js
  179. 0 test/{ → tap}/log4js.json
  180. +162 −0 test/tap/logLevelFilter-test.js
  181. +251 −0 test/tap/logger-test.js
  182. +268 −0 test/tap/logging-test.js
  183. +250 −0 test/tap/multi-file-appender-test.js
  184. +127 −0 test/tap/multiprocess-shutdown-test.js
  185. +374 −0 test/tap/multiprocess-test.js
  186. +279 −0 test/tap/newLevel-test.js
  187. +15 −0 test/tap/no-cluster-test.js
  188. +203 −0 test/tap/noLogFilter-test.js
  189. +53 −0 test/tap/passenger-test.js
  190. +93 −0 test/tap/pause-test.js
  191. +125 −0 test/tap/pm2-support-test.js
  192. +90 −0 test/tap/server-test.js
  193. +48 −0 test/tap/setLevel-asymmetry-test.js
  194. +29 −0 test/tap/stacktraces-test.js
  195. +59 −0 test/tap/stderrAppender-test.js
  196. +30 −0 test/tap/stdoutAppender-test.js
  197. +123 −0 test/tap/subcategories-test.js
  198. +175 −0 test/tap/tcp-appender-test.js
  199. +5 −0 test/tap/test-config.json
  200. 0 test/{ → tap}/with-log-rolling.json
  201. +0 −23 test/with-categoryFilter.json
  202. +0 −17 test/with-dateFile.json
  203. +0 −41 test/with-logLevelFilter.json
  204. +385 −0 types/log4js.d.ts
  205. +160 −0 types/test.ts
  206. +9 −0 types/tsconfig.json
  207. +11 −0 v2-changes.md
12 changes: 0 additions & 12 deletions .bob.json

This file was deleted.

29 changes: 29 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
end_of_line = lf
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.js]
quote_type = single
curly_bracket_next_line = true
indent_brace_style = Allman
spaces_around_operators = true
spaces_around_brackets = inside
continuation_indent_size = 2

[*.html]
# indent_size = 4

[*{.yml,.yaml,.json}]
indent_style = space
indent_size = 2

[.eslintrc]
indent_style = space
indent_size = 2
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

19 changes: 19 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"root": true,
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"extends": ["airbnb-base", "prettier"],
"plugins": ["prettier", "import"],
"rules": {
"comma-dangle": 0,
"indent": 2,
"func-names": 0,
"max-len": [1, 120, 2],
"no-use-before-define": ["warn"],
"no-param-reassign": 0,
"strict": 1,
"import/no-extraneous-dependencies": 1
}
}
21 changes: 21 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Automatically normalize line endings for all text-based files
# http://git-scm.com/docs/gitattributes#_end_of_line_conversion
* text=auto

# For the following file types, normalize line endings to LF on
# checkin and prevent conversion to CRLF when they are checked out
# (this is required in order to prevent newline related issues like,
# for example, after the build script is run)
.* text eol=lf
*.css text eol=lf
*.html text eol=lf
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.sh text eol=lf
*.txt text eol=lf
*.xml text eol=lf

# Exclude the `.htaccess` file from GitHub's language statistics
# https://github.com/github/linguist#using-gitattributes
dist/.htaccess linguist-vendored
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '15 11 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
32 changes: 32 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
os: [ubuntu-latest, windows-latest]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test
38 changes: 38 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a milestone is closed
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package

on:
milestone:
types: [closed]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: |
git config user.name github-actions
git config user.email github-actions@github.com
- run: npm version ${{ github.event.milestone.title }}
- run: git push && git push --tags
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
# Logs
logs
*.log*
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

build
node_modules
.bob/
test/streams/test-*
.idea
.vscode
.DS_Store

yarn.lock
coverage/
.nyc_output/
_site
Gemfile.lock
Dockerfile
docker-compose.yml

#personal config
.env
15 changes: 0 additions & 15 deletions .jshintrc

This file was deleted.

19 changes: 19 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Created by .ignore support plugin
**/.*
node_modules
bower_components
test
tests
support
benchmarks
examples
sample
lib-cov
coverage.html
Makefile
coverage
Gemfile
Gemfile.lock
docker-compose.yml
Dockerfile
.bob
14 changes: 9 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
language: node_js
os:
- linux
- windows
sudo: false
node_js:
- "6"
- "5"
- "4"
- "0.12"
- "0.10"
- "14"
- "12"
- "10"
- "8"
after_success:
- npm run codecov
Loading