@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-14T16:25:30.126Z") @Stability(value=Stable) public enum LogLevel extends Enum<LogLevel>
Example:
NodejsFunction.Builder.create(this, "my-handler")
.bundling(BundlingOptions.builder()
.minify(true) // minify code, defaults to false
.sourceMap(true) // include source map, defaults to false
.sourceMapMode(SourceMapMode.INLINE) // defaults to SourceMapMode.DEFAULT
.sourcesContent(false) // do not include original source into source map, defaults to true
.target("es2020") // target environment for the generated JavaScript code
.loader(Map.of( // Use the 'dataurl' loader for '.png' files
".png", "dataurl"))
.define(Map.of( // Replace strings during build time
"process.env.API_KEY", JSON.stringify("xxx-xxxx-xxx"),
"process.env.PRODUCTION", JSON.stringify(true),
"process.env.NUMBER", JSON.stringify(123)))
.logLevel(LogLevel.SILENT) // defaults to LogLevel.WARNING
.keepNames(true) // defaults to false
.tsconfig("custom-tsconfig.json") // use custom-tsconfig.json instead of default,
.metafile(true) // include meta file, defaults to false
.banner("/* comments */") // requires esbuild >= 0.9.0, defaults to none
.footer("/* comments */") // requires esbuild >= 0.9.0, defaults to none
.charset(Charset.UTF8) // do not escape non-ASCII characters, defaults to Charset.ASCII
.format(OutputFormat.ESM) // ECMAScript module output format, defaults to OutputFormat.CJS (OutputFormat.ESM requires Node.js 14.x)
.mainFields(List.of("module", "main")) // prefer ECMAScript versions of dependencies
.inject(List.of("./my-shim.js", "./other-shim.js")) // allows to automatically replace a global variable with an import from another file
.esbuildArgs(Map.of( // Pass additional arguments to esbuild
"--log-limit", "0",
"--splitting", true))
.build())
.build();
| Enum Constant and Description |
|---|
ERROR
Show errors only.
|
INFO
Show everything.
|
SILENT
Show nothing.
|
WARNING
Show warnings and errors.
|
| Modifier and Type | Method and Description |
|---|---|
static LogLevel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LogLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Stable) public static final LogLevel INFO
@Stability(value=Stable) public static final LogLevel WARNING
@Stability(value=Stable) public static final LogLevel ERROR
@Stability(value=Stable) public static final LogLevel SILENT
public static LogLevel[] values()
for (LogLevel c : LogLevel.values()) System.out.println(c);
public static LogLevel valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2023. All rights reserved.