Skip to content

Commit 8a1bccb

Browse files
authored
Merge pull request #516 from idaholab/fix/reduce-logs
Fix/reduce logs
2 parents 758c543 + 688cc6f commit 8a1bccb

File tree

10 files changed

+15
-34
lines changed

10 files changed

+15
-34
lines changed

server/NodeLibraries/deeplynx/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "deeplynx",
3-
"version": "1.7.4",
3+
"version": "1.7.4.1",
44
"main": "index.js",
55
"types": "index.d.ts",
66
"napi": {

server/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "deep-lynx",
3-
"version": "1.7.4",
3+
"version": "1.7.4.1",
44
"description": "DeepLynx allows for an integrated platform during design and operations of mega projects.",
55
"main": "./dist/main.js",
66
"author": "John Darrington and Christopher Ritter",
@@ -132,7 +132,7 @@
132132
"csv-stringify": "^6.5.1",
133133
"csvtojson": "^2.0.10",
134134
"date-fns": "^2.30.0",
135-
"deeplynx": "^1.7.4",
135+
"deeplynx": "^1.7.4.1",
136136
"dev-null": "^0.1.1",
137137
"digest-stream": "^2.0.0",
138138
"dot-prop": "^5.3.0",

server/src/http_server/authentication/saml/saml-adfs.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ export function SetSamlAdfs(app: express.Application) {
3131

3232
passport.deserializeUser((user: string, done: any) => {
3333
void UserMapper.Instance.Retrieve(user).then((result) => {
34-
Logger.info(`Deserializing User. Is error: ${result.isError}`);
3534
if (result.isError) done('unable to retrieve user', null);
3635

37-
Logger.info(`Returned user: ${result.value})}`)
3836
done(null, result.value);
3937
});
4038
});
@@ -57,7 +55,6 @@ export function SetSamlAdfs(app: express.Application) {
5755
},
5856
// eslint-disable-next-line @typescript-eslint/no-misused-promises
5957
(profile: any, done: any) => {
60-
Logger.info(`In passport.use. ${Config}`);
6158
Logger.info(`Saml email key: ${Config.saml_claims_email}`);
6259
Logger.info(`Saml email value: ${profile[Config.saml_claims_email]}`);
6360
const storage = UserMapper.Instance;
@@ -77,7 +74,6 @@ export function SetSamlAdfs(app: express.Application) {
7774
// if there are no other users of this DeepLynx instance
7875
// we go ahead and assign admin status to this newly created
7976
// user
80-
Logger.info(`User not found. Creating new user. Users found: ${users.value.length}`);
8177
void storage
8278
.Create(
8379
'saml-adfs login',
@@ -93,23 +89,17 @@ export function SetSamlAdfs(app: express.Application) {
9389
)
9490
.then((user: Result<User>) => {
9591
if (user.isError) {
96-
Logger.error(`Error creating user ${user.error}`)
9792
resolve(done(user.error, false));
9893
}
9994

100-
Logger.info(`User created. ${user.value}`)
10195
resolve(done(null, serialize(user.value)));
10296
});
10397
});
10498
} else {
105-
Logger.info('Resolving with user')
10699
resolve(done(null, serialize(result.value)));
107100
}
108101
})
109-
.catch((error) => {
110-
Logger.error(`Caught error retrieving user by email. ${error}`)
111-
resolve(done(error, false))
112-
});
102+
.catch((error) => resolve(done(error, false)));
113103
});
114104
},
115105
),

server/src/http_server/routes/access_management/oauth_routes.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -363,13 +363,11 @@ export default class OAuthRoutes {
363363
}
364364

365365
private static loginSaml(req: Request, res: Response) {
366-
Logger.info('start loginSaml');
367366
const oauthRequest = oauthRepo.authorizationFromRequest(req);
368367

369368
// if this login is part of an OAuth request flow, we must save it in cache
370369
// so that we can restore it as part of the redirect
371370
if (oauthRequest) {
372-
Logger.info(`In oauthRequest: ${oauthRequest}`);
373371
const token = Buffer.from(uuidv4()).toString('base64');
374372
Cache.set(token, serialize(oauthRequest), 60 * 10).then((set) => {
375373
if (!set) {
@@ -380,15 +378,13 @@ export default class OAuthRoutes {
380378

381379
req.query.RelayState = token;
382380

383-
Logger.info('Saml authenticate attempt');
384381
passport.authenticate('saml', {
385382
failureRedirect: '/unauthorized',
386383
failureFlash: true,
387384
keepSessionInfo: true,
388385
})(req, res);
389386
});
390387
} else {
391-
Logger.info('No oauthRequest. Saml authenticate attempt');
392388
passport.authenticate('saml', {
393389
failureRedirect: '/unauthorized',
394390
failureFlash: true,
@@ -398,11 +394,9 @@ export default class OAuthRoutes {
398394
}
399395

400396
private static saml(req: Request, res: Response, next: NextFunction) {
401-
Logger.info('start saml');
402397
passport.authenticate('saml', { keepSessionInfo: true }, (err: any, user: any, info: any) => {
403398
if (err) {
404399
Logger.error(`saml authenticate err: ${err}`);
405-
Logger.info(`Redirecting to: ${buildUrl('/oauth', {queryParams: {error: `${err}`}})}`);
406400
res.redirect(buildUrl('/oauth', { queryParams: { error: `${err}` } }));
407401
return;
408402
}
@@ -416,8 +410,6 @@ export default class OAuthRoutes {
416410
if (req.body.RelayState) {
417411
Cache.get<object>(req.body.RelayState as string).then((oauthRequest) => {
418412
if (oauthRequest) {
419-
// eslint-disable-next-line @typescript-eslint/no-base-to-string
420-
Logger.info(`Redirecting to /oauth/authorize with query param: ${oauthRequest}`);
421413
res.redirect(
422414
buildUrl('/oauth/authorize', {
423415
queryParams: oauthRequest,
@@ -427,7 +419,6 @@ export default class OAuthRoutes {
427419
}
428420
});
429421
} else {
430-
Logger.info('Redirecting to /oauth/profile');
431422
res.redirect('/oauth/profile');
432423
return;
433424
}

server/yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4378,7 +4378,7 @@ __metadata:
43784378
csv-stringify: "npm:^6.5.1"
43794379
csvtojson: "npm:^2.0.10"
43804380
date-fns: "npm:^2.30.0"
4381-
deeplynx: "npm:^1.7.4"
4381+
deeplynx: "npm:^1.7.4.1"
43824382
dev-null: "npm:^0.1.1"
43834383
digest-stream: "npm:^2.0.0"
43844384
dot-prop: "npm:^5.3.0"

ui/AdminWebApp/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/AdminWebApp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "deep-lynx-admin-gui",
3-
"version": "1.7.4",
3+
"version": "1.7.4.1",
44
"private": true,
55
"scripts": {
66
"serve": "cross-env NODE_ENV=development vue-cli-service serve",

ui/WebGLViewer/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/WebGLViewer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "webgl-viewer",
33
"private": true,
4-
"version": "1.7.4",
4+
"version": "1.7.4.1",
55
"type": "module",
66
"proxy": "http://0.0.0.0:8091",
77
"scripts": {

0 commit comments

Comments
 (0)