Class LocalEnvironment
- java.lang.Object
-
- software.amazon.cloudwatchlogs.emf.environment.LocalEnvironment
-
- All Implemented Interfaces:
Environment
public class LocalEnvironment extends java.lang.Object implements Environment
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureContext(MetricsContext context)java.lang.StringgetLogGroupName()Get log group name.java.lang.StringgetName()Get the environment name.ISinkgetSink()java.lang.StringgetType()Get the environment type.booleanprobe()Determines whether or not we are executing in this environment.
-
-
-
Method Detail
-
probe
public boolean probe()
Description copied from interface:EnvironmentDetermines whether or not we are executing in this environment.- Specified by:
probein interfaceEnvironment- Returns:
- true if it is running in this environment, otherwise, false
-
getName
public java.lang.String getName()
Description copied from interface:EnvironmentGet the environment name. This will be used to set the ServiceName dimension.- Specified by:
getNamein interfaceEnvironment- Returns:
- the name of the environment
-
getType
public java.lang.String getType()
Description copied from interface:EnvironmentGet the environment type. This will be used to set the ServiceType dimension.- Specified by:
getTypein interfaceEnvironment- Returns:
- the type of the environment
-
getLogGroupName
public java.lang.String getLogGroupName()
Description copied from interface:EnvironmentGet log group name. This will be used to set the LogGroup dimension.- Specified by:
getLogGroupNamein interfaceEnvironment- Returns:
- the log group name
-
configureContext
public void configureContext(MetricsContext context)
- Specified by:
configureContextin interfaceEnvironment- Parameters:
context- the context to configure with environment properties
-
getSink
public ISink getSink()
- Specified by:
getSinkin interfaceEnvironment- Returns:
- an appropriate sink for this environment
-
-