Skip to content

Commit

Permalink
Turn off warnings on lambda logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mbklein committed Nov 6, 2024
1 parent 3063a92 commit 4d10f27
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ npm-debug.log
*.tfvars

/infrastructure/**/.terraform/
/infrastructure/**/*.tfstate
/infrastructure/**/*.tfstate*
/infrastructure/**/_build/
/infrastructure/**/build/
/infrastructure/**/builds/
Expand Down
13 changes: 2 additions & 11 deletions app/lib/meadow/config/runtime/dev.ex
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,8 @@ defmodule Meadow.Config.Runtime.Dev do
mediaconvert_role: get_secret(:meadow, ["transcode", "role_arn"])

config :meadow,
iiif_server_url:
get_secret(
:iiif,
["v3"],
"https://iiif.dev.rdc.library.northwestern.edu/iiif/3/#{prefix()}"
),
iiif_manifest_url_deprecated:
Path.join(
get_secret(:iiif, ["base"], "https://#{prefix()}-pyramids.s3.amazonaws.com/"),
"public/"
)
iiif_server_url: Path.join(get_secret(:iiif, ["v3"]), prefix()),
iiif_manifest_url_deprecated: Path.join(get_secret(:iiif, ["base"]), "public/")

config :meadow, Meadow.Scheduler,
jobs: [
Expand Down
11 changes: 10 additions & 1 deletion app/priv/nodejs/lambda/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ const portlog = (level, ...args) =>
writeln([`[${level}]`, ...args].filter((e) => e != null).join(" "));

["log", "debug", "info", "warn", "error"].forEach((level) => {
let outLevel = level == "log" ? "info" : level;
let outLevel;

if (level == "log") {
outLevel = "info";
} else if (level == "warn") {
outLevel = "warning";
} else {
outLevel = level;
}

global.console[level] = (...args) => portlog(outLevel, ...args);
});

Expand Down
File renamed without changes.

0 comments on commit 4d10f27

Please sign in to comment.