Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log in local timezone if configured to #572

Draft
wants to merge 1 commit into
base: v3.x/staging
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
All notable changes to the Zlux Server Framework package will be documented in this file.
This repo is part of the app-server Zowe Component, and the change logs here may appear on Zowe.org in that section.

## 3.1.0
- Enhancement: Server can be set to log using the local timezone via property `zowe.logger.timezone: environment` which will use the value of the TZ environment variable. (#572)

## 3.0.0
- Enhancement: Add ability for server to dynamically load plugin web content based on `entryPoint` specification in the
`pluginDefinition.json`
- Enhancement: Add ability for server to dynamically load plugin web content based on `entryPoint` specification in the `pluginDefinition.json`

## 2.17.0
- Enhancement: Added function `isClientAttls(zoweConfig)` within `libs/util.js`. Whenever a plugin makes a network request, it should always use this to determine if a normally HTTPS request should instead be made as HTTP due to AT-TLS handling the TLS when enabled. (#544)
Expand Down
7 changes: 6 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@

if (!global.COM_RS_COMMON_LOGGER) {
const loggerFile = require('../../zlux-shared/src/logging/logger.js');
global.COM_RS_COMMON_LOGGER = new loggerFile.Logger();
let msOffset = undefined;
if (process.env.ZWE_zowe_logging_timezone == 'environment') {
let d = new Date();
msOffset = d.getTimezoneOffset() * 1000 * 60;
}
global.COM_RS_COMMON_LOGGER = new loggerFile.Logger(msOffset);
global.COM_RS_COMMON_LOGGER.addDestination(global.COM_RS_COMMON_LOGGER.makeDefaultDestination(true,true,true,true,true));
}

Expand Down
12 changes: 7 additions & 5 deletions utils/packaging-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
const path = require('path');
const Promise = require('bluebird');
const fs = require('graceful-fs');
//assuming that this is file isnt being called from another that is already using the logger... else expect strange logs
const logging = require('../../zlux-shared/src/logging/logger.js');
const coreLogger = new logging.Logger();
//simple program, no need for logger names to be displayed
coreLogger.addDestination(coreLogger.makeDefaultDestination(true,false,false));
let coreLogger = global.COM_RS_COMMON_LOGGER;
if (!global.COM_RS_COMMON_LOGGER) { //app-server creates logger prior to this running, so don't create twice.
const logging = require('../../zlux-shared/src/logging/logger.js');
coreLogger = new logging.Logger();
//simple program, no need for logger names to be displayed
coreLogger.addDestination(coreLogger.makeDefaultDestination(true,false,false));
}

let logger;

Expand Down
Loading