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: 61cc6818369c5f1a83cefded53688375f5b28b0c
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

Commits on Aug 24, 2017

  1. Copy the full SHA
    fc2ba41 View commit details

Commits on Aug 12, 2018

  1. chore: fix for #729

    Gareth Jones committed Aug 12, 2018
    Copy the full SHA
    4d81c5a View commit details

Commits on Aug 13, 2018

  1. fix(#687): shutdown callback arg is not optional

    Gareth Jones committed Aug 13, 2018
    Copy the full SHA
    8e4bfb5 View commit details
  2. Merge pull request #779 from log4js-node/fix-type-for-shutdown

    fix(#687): shutdown callback arg is not optional
    nomiddlename authored Aug 13, 2018
    Copy the full SHA
    85ae881 View commit details

Commits on Aug 17, 2018

  1. Copy the full SHA
    7e008c8 View commit details

Commits on Sep 25, 2018

  1. refactor(multiprocess): serialisation consistency

    Delegate all serialisation tasks to LoggingEvent, instead of
    maintaining a separate codepath in the multiprocess appender
    LoneRifle committed Sep 25, 2018
    Copy the full SHA
    7f248c4 View commit details

Commits on Sep 28, 2018

  1. fix: #793

    so5 committed Sep 28, 2018
    Copy the full SHA
    2a336d9 View commit details

Commits on Oct 1, 2018

  1. Merge pull request #790 from LoneRifle/master

    refactor(multiprocess): serialisation consistency
    nomiddlename authored Oct 1, 2018
    Copy the full SHA
    51084d7 View commit details
  2. Merge pull request #780 from t4d-io-website/master

    fix require.main for use with Node.js mjs modules
    nomiddlename authored Oct 1, 2018
    Copy the full SHA
    bd7097a View commit details

Commits on Oct 2, 2018

  1. Copy the full SHA
    f066f19 View commit details

Commits on Oct 8, 2018

  1. Copy the full SHA
    0700d6a View commit details
  2. 3.0.6

    Gareth Jones committed Oct 8, 2018
    Copy the full SHA
    86333dc View commit details

Commits on Nov 4, 2018

  1. fix(#789): use flatted in place of CircularJSON

    CircularJSON is now deprecated, so replace it with its successor
    and use it in the sole location where we used CircularJSON, ie
    in the LoggingEvent serialization/deserialization functions
    
    * npm - install flatted, remove circular-json
    * LoggingEvent - use flatted for serialization/deserialization
    * tests - acknowledge that flatted (and circular-json) should not
      parse anything other than their respective serialized payloads
      and use flatted when parsing/stringifying test data
    LoneRifle committed Nov 4, 2018
    Copy the full SHA
    29c9221 View commit details

Commits on Nov 13, 2018

  1. Copy the full SHA
    149c102 View commit details

Commits on Nov 14, 2018

  1. Merge pull request #807 from jiro4989/hotfix/fix_example_code

    [fix]change wrong property name, from 'numBackups' to 'backups'
    nomiddlename authored Nov 14, 2018
    Copy the full SHA
    f7eee87 View commit details

Commits on Dec 2, 2018

  1. Copy the full SHA
    80ca596 View commit details
  2. Merge pull request #815 from mattiacapitanio/noLogFilter

    FeatureRequest: nolog in general config #640
    nomiddlename authored Dec 2, 2018
    Copy the full SHA
    d0915bf View commit details

Commits on Dec 19, 2018

  1. Copy the full SHA
    84437ef View commit details
  2. Copy the full SHA
    d271722 View commit details
  3. Merge pull request #819 from blakambr/master

    Feature - Add status code rulesets for connectLogger
    nomiddlename authored Dec 19, 2018
    Copy the full SHA
    2f738eb View commit details

Commits on Jan 5, 2019

  1. chore: work in progress commit as backup

    Gareth Jones committed Jan 5, 2019
    Copy the full SHA
    ee81a50 View commit details

Commits on Jan 23, 2019

  1. fix: all tests passing now with updated streamroller

    Gareth Jones committed Jan 23, 2019
    Copy the full SHA
    09c02e0 View commit details
  2. fix: got package-lock.json back in sync

    Gareth Jones committed Jan 23, 2019
    Copy the full SHA
    dca0e8e View commit details
  3. Merge pull request #826 from log4js-node/update-streamroller

    Update streamroller
    nomiddlename authored Jan 23, 2019
    Copy the full SHA
    d9b92cc View commit details

Commits on Jan 24, 2019

  1. Merge branch 'flatted' of https://github.com/LoneRifle/log4js-node in…

    …to LoneRifle-flatted
    Gareth Jones committed Jan 24, 2019
    Copy the full SHA
    26e9418 View commit details
  2. Merge branch 'LoneRifle-flatted'

    Gareth Jones committed Jan 24, 2019
    Copy the full SHA
    19a7993 View commit details
  3. docs: mention that file and dateFile are the same now

    Gareth Jones committed Jan 24, 2019
    Copy the full SHA
    615492d View commit details
  4. 4.0.0

    Gareth Jones committed Jan 24, 2019
    Copy the full SHA
    1554503 View commit details

Commits on Jan 28, 2019

  1. fix: #827 - level overrides

    Gareth Jones committed Jan 28, 2019
    Copy the full SHA
    d8415fd View commit details
  2. Merge pull request #830 from log4js-node/fix-level-override

    fix: #827 - level overrides
    nomiddlename authored Jan 28, 2019
    Copy the full SHA
    a26a1ea View commit details
  3. 4.0.1

    Gareth Jones committed Jan 28, 2019
    Copy the full SHA
    24c3c4d View commit details

Commits on Jan 30, 2019

  1. chore: improved connect-logger test coverage

    Gareth Jones committed Jan 30, 2019
    Copy the full SHA
    0542073 View commit details

Commits on Feb 3, 2019

  1. chore: improve coverage for connect middleware

    Gareth Jones committed Feb 3, 2019
    Copy the full SHA
    6741c0b View commit details
  2. Merge pull request #831 from log4js-node/improve-connect-logger-coverage

    Improve connect logger coverage
    nomiddlename authored Feb 3, 2019
    Copy the full SHA
    8757ecd View commit details
  3. 4.0.2

    Gareth Jones committed Feb 3, 2019
    Copy the full SHA
    8221ada View commit details

Commits on Feb 4, 2019

  1. Copy the full SHA
    efd5d2c View commit details

Commits on Feb 20, 2019

  1. Copy the full SHA
    a06e2cc View commit details
  2. fix: updated streamroller dep to fix bug

    Gareth Jones committed Feb 20, 2019
    Copy the full SHA
    4d3fb32 View commit details
  3. Merge pull request #840 from martinheidegger/update-dependencies

    Updating dependencies (including eslint)
    nomiddlename authored Feb 20, 2019
    Copy the full SHA
    675dfd9 View commit details

Commits on Feb 27, 2019

  1. fix: merged package-lock

    Gareth Jones committed Feb 27, 2019
    Copy the full SHA
    0410f78 View commit details
  2. chore: change for updated husky

    Gareth Jones committed Feb 27, 2019
    Copy the full SHA
    a406ed8 View commit details
  3. Merge pull request #841 from log4js-node/streamroller-1.0.3

    fix: updated streamroller dep to fix bug
    nomiddlename authored Feb 27, 2019
    Copy the full SHA
    e4611e1 View commit details

Commits on Mar 12, 2019

  1. Allow anything in the addLayout

    per
     
    
    # Adding your own layouts
    
    You can add your own layouts by calling `log4js.addLayout(type, fn)` before calling `log4js.configure`. `type` is the label you want to use to refer to your layout in appender configuration. `fn` is a function that takes a single object argument, which will contain the configuration for the layout instance, and returns a layout function. A layout function takes a log event argument and **returns a string (usually, although you could return anything as long as the appender knows what to do with it).**
    xinbenlv authored Mar 12, 2019
    Copy the full SHA
    3d529ac View commit details

Commits on Mar 25, 2019

  1. Copy the full SHA
    e290b6f View commit details
  2. Merge pull request #851 from log4js-node/log-rolling-bug

    fix: updated streamroller to fix log rolling when appending
    nomiddlename authored Mar 25, 2019
    Copy the full SHA
    63e1d98 View commit details
  3. chore: updated changelog for 4.1.0

    Gareth Jones committed Mar 25, 2019
    Copy the full SHA
    30c5f3f View commit details
  4. 4.1.0

    Gareth Jones committed Mar 25, 2019
    Copy the full SHA
    9452470 View commit details

Commits on Apr 24, 2019

  1. Copy the full SHA
    027f256 View commit details

Commits on Apr 25, 2019

  1. test: fixes for node 12

    Gareth Jones committed Apr 25, 2019
    Copy the full SHA
    9d630af View commit details
  2. chore: update deps, add v12 to travis config

    Gareth Jones committed Apr 25, 2019
    Copy the full SHA
    c3aed45 View commit details
Showing with 12,000 additions and 8,426 deletions.
  1. +14 −16 .eslintrc
  2. +70 −0 .github/workflows/codeql-analysis.yml
  3. +32 −0 .github/workflows/node.js.yml
  4. +38 −0 .github/workflows/npm-publish.yml
  5. +3 −0 .gitignore
  6. +1 −0 .npmignore
  7. +5 −2 .travis.yml
  8. +191 −0 CHANGELOG.md
  9. +45 −35 README.md
  10. +19 −0 SECURITY.md
  11. +2 −0 docs/api.md
  12. +18 −0 docs/appenders.md
  13. +0 −3 docs/assets/css/style.scss
  14. +55 −0 docs/categories.md
  15. +43 −1 docs/connect-logger.md
  16. +25 −2 docs/dateFile.md
  17. +26 −0 docs/faq.md
  18. +23 −1 docs/file.md
  19. +1 −1 docs/fileSync.md
  20. +17 −14 docs/index.md
  21. +15 −2 docs/layouts.md
  22. +58 −0 docs/noLogFilter.md
  23. +2 −2 docs/recording.md
  24. +2 −0 docs/tcp.md
  25. +1 −1 docs/terms.md
  26. +3 −1 examples/date-file-rolling.js
  27. +31 −0 examples/log-rolling-bug.js
  28. +1 −1 examples/log-to-files.js
  29. +22 −0 examples/stacktrace.js
  30. +13 −5 lib/LoggingEvent.js
  31. +0 −2 lib/appenders/adapters.js
  32. +0 −2 lib/appenders/categoryFilter.js
  33. +1 −2 lib/appenders/console.js
  34. +36 −17 lib/appenders/dateFile.js
  35. +43 −14 lib/appenders/file.js
  36. +8 −9 lib/appenders/fileSync.js
  37. +45 −12 lib/appenders/index.js
  38. +0 −2 lib/appenders/logLevelFilter.js
  39. +4 −1 lib/appenders/multiFile.js
  40. +27 −43 lib/appenders/multiprocess.js
  41. +43 −0 lib/appenders/noLogFilter.js
  42. +4 −4 lib/appenders/recording.js
  43. +1 −1 lib/appenders/stderr.js
  44. +1 −1 lib/appenders/stdout.js
  45. +18 −6 lib/appenders/tcp.js
  46. +101 −10 lib/categories.js
  47. +59 −48 lib/clustering.js
  48. +15 −4 lib/configuration.js
  49. +181 −148 lib/connect-logger.js
  50. +77 −48 lib/layouts.js
  51. +12 −10 lib/levels.js
  52. +66 −40 lib/log4js.js
  53. +60 −15 lib/logger.js
  54. +5,091 −5,288 package-lock.json
  55. +32 −25 package.json
  56. +1 −1 test/{tap → }/multiprocess-worker.js
  57. +5 −7 test/sandbox-coverage.js
  58. +62 −24 test/tap/LoggingEvent-test.js
  59. +114 −0 test/tap/appender-dependencies-test.js
  60. +44 −33 test/tap/categoryFilter-test.js
  61. +43 −39 test/tap/cluster-test.js
  62. +330 −0 test/tap/configuration-inheritance-test.js
  63. +59 −39 test/tap/configuration-test.js
  64. +320 −235 test/tap/configuration-validation-test.js
  65. +124 −0 test/tap/connect-context-test.js
  66. +276 −104 test/tap/connect-logger-test.js
  67. +227 −99 test/tap/connect-nolog-test.js
  68. +27 −33 test/tap/consoleAppender-test.js
  69. +117 −62 test/tap/dateFileAppender-test.js
  70. +31 −28 test/tap/default-settings-test.js
  71. +22 −24 test/tap/disable-cluster-test.js
  72. +19 −0 test/tap/dummy-appender.js
  73. +80 −0 test/tap/file-descriptor-leak-test.js
  74. +103 −35 test/tap/file-sighup-test.js
  75. +297 −230 test/tap/fileAppender-test.js
  76. +141 −95 test/tap/fileSyncAppender-test.js
  77. +628 −223 test/tap/layouts-test.js
  78. +4 −4 test/tap/levels-before-configure-test.js
  79. +106 −57 test/tap/levels-test.js
  80. +102 −72 test/tap/logLevelFilter-test.js
  81. +196 −75 test/tap/logger-test.js
  82. +193 −110 test/tap/logging-test.js
  83. +185 −101 test/tap/multi-file-appender-test.js
  84. +53 −62 test/tap/multiprocess-shutdown-test.js
  85. +178 −174 test/tap/multiprocess-test.js
  86. +132 −130 test/tap/newLevel-test.js
  87. +15 −0 test/tap/no-cluster-test.js
  88. +203 −0 test/tap/noLogFilter-test.js
  89. +24 −21 test/tap/passenger-test.js
  90. +93 −0 test/tap/pause-test.js
  91. +55 −35 test/tap/pm2-support-test.js
  92. +77 −57 test/tap/server-test.js
  93. +11 −14 test/tap/setLevel-asymmetry-test.js
  94. +10 −12 test/tap/stacktraces-test.js
  95. +29 −27 test/tap/stderrAppender-test.js
  96. +15 −15 test/tap/stdoutAppender-test.js
  97. +68 −67 test/tap/subcategories-test.js
  98. +156 −36 test/tap/tcp-appender-test.js
  99. +259 −171 types/log4js.d.ts
  100. +65 −36 types/test.ts
30 changes: 14 additions & 16 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
{
"root": true,
"extends": "airbnb-base",
"rules": {
"comma-dangle": 0,
"indent": 2,
"object-shorthand": 0,
"func-names": 0,
"max-len": [1, 120, 2],
"no-use-before-define": ["warn"],
"no-param-reassign": 0,
"strict": 0,
"import/no-extraneous-dependencies": 1,
"prefer-spread": 0,
"prefer-rest-params": 0,
"prefer-destructuring": 0
},
"parserOptions": {
"ecmaVersion": 6
"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
}
}
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}}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -23,3 +23,6 @@ _site
Gemfile.lock
Dockerfile
docker-compose.yml

#personal config
.env
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -16,3 +16,4 @@ Gemfile
Gemfile.lock
docker-compose.yml
Dockerfile
.bob
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
language: node_js
dist: trusty
os:
- linux
- windows
sudo: false
node_js:
- "14"
- "12"
- "10"
- "8"
- "6"
after_success:
- npm run codecov
Loading