class LogGroupFactory
| Language | Type name |
|---|---|
Python | aws_rfdk.LogGroupFactory |
TypeScript (source) | aws-rfdk » LogGroupFactory |
This factory will return an ILogGroup based on the configuration provided to it.
The LogGroup will either be wrapped in a LogRetention from the aws-lambda package that has the ability to look up and reuse an existing LogGroup or an ExportingLogGroup that uses a LogRetention and adds additional functionality to export the logs to S3.
Initializer
new LogGroupFactory()
Methods
| Name | Description |
|---|---|
| static create | Either create a new LogGroup given the LogGroup name, or return the existing LogGroup. |
static createOrFetch(scope, logWrapperId, logGroupName, props?)
public static createOrFetch(scope: Construct, logWrapperId: string, logGroupName: string, props?: LogGroupFactoryProps): ILogGroup
Parameters
- scope
Construct - logWrapperId
string - logGroupName
string - props
LogGroup Factory Props
Returns
Either create a new LogGroup given the LogGroup name, or return the existing LogGroup.

Python
TypeScript (