Class Logs
- java.lang.Object
-
- com.oracle.bedrock.runtime.docker.commands.AbstractDockerCommand<C>
-
- com.oracle.bedrock.runtime.docker.commands.CommandWithArgumentList<Logs>
-
- com.oracle.bedrock.runtime.docker.commands.Logs
-
- All Implemented Interfaces:
com.oracle.bedrock.runtime.MetaClass<com.oracle.bedrock.runtime.Application>
public class Logs extends CommandWithArgumentList<Logs>
A representation of the Docker logs command.Instances of
Logsare immutable, methods that add options and configuration to thisLogscommand return a new instance of aLogscommand with the modifications applied.Copyright (c) 2016. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.- Author:
- Jonathan Knight
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Logsfollow(boolean enabled)Follow log output (equates to the --follow argument).static Logsfrom(Object containerName)Create aLogscommand to view the logs from a specific container.Logssince(Object timestamp)Show logs since timestamp (equates to the --since argument).Logstail(Object numberOfLines)Show the specified number of lines to from the end of the logs (equates to the --tail argument).protected LogswithCommandArguments(List<com.oracle.bedrock.runtime.options.Argument> endArgs, com.oracle.bedrock.runtime.options.Argument... args)Obtain a copy of thisCommandWithArgumentListwith the addition of the specified command argumentsArguments.protected LogswithoutCommandArguments(List<com.oracle.bedrock.runtime.options.Argument> names, com.oracle.bedrock.runtime.options.Argument... args)Obtain a copy of thisCommandWithArgumentListwithout the the specified command argumentsArguments.-
Methods inherited from class com.oracle.bedrock.runtime.docker.commands.CommandWithArgumentList
onLaunch, withCommandArguments, withoutCommandArguments
-
Methods inherited from class com.oracle.bedrock.runtime.docker.commands.AbstractDockerCommand
getCommandArguments, getImplementationClass, getTimeout, onLaunched, onLaunching, timeoutAfter, timeoutAfter
-
-
-
-
Method Detail
-
follow
public Logs follow(boolean enabled)
Follow log output (equates to the --follow argument).- Parameters:
enabled- should follow logging be enabled- Returns:
- a new
Logsinstance that is the same as this instance with the --follow option applied
-
since
public Logs since(Object timestamp)
Show logs since timestamp (equates to the --since argument).- Parameters:
timestamp- a value that resolves to the timestamp to use to determine the logs to show- Returns:
- a new
Logsinstance that is the same as this instance with the --since option applied
-
tail
public Logs tail(Object numberOfLines)
Show the specified number of lines to from the end of the logs (equates to the --tail argument).- Parameters:
numberOfLines- a value that resolves to the number of log lines to show, or equates to "all" to show all lines- Returns:
- a new
Logsinstance that is the same as this instance with the --tail option applied
-
from
public static Logs from(Object containerName)
Create aLogscommand to view the logs from a specific container.- Parameters:
containerName- the containe to view the logs for- Returns:
- a
Logscommand to view the logs from a specific container
-
withCommandArguments
protected Logs withCommandArguments(List<com.oracle.bedrock.runtime.options.Argument> endArgs, com.oracle.bedrock.runtime.options.Argument... args)
Description copied from class:CommandWithArgumentListObtain a copy of thisCommandWithArgumentListwith the addition of the specified command argumentsArguments.- Specified by:
withCommandArgumentsin classCommandWithArgumentList<Logs>- Parameters:
endArgs- theListofArgumentsthat appear at the end of the command lineargs- the new command to add- Returns:
- a copy of this
CommandWithArgumentListwith the addition of the specified command argumentsArguments
-
withoutCommandArguments
protected Logs withoutCommandArguments(List<com.oracle.bedrock.runtime.options.Argument> names, com.oracle.bedrock.runtime.options.Argument... args)
Description copied from class:CommandWithArgumentListObtain a copy of thisCommandWithArgumentListwithout the the specified command argumentsArguments.- Specified by:
withoutCommandArgumentsin classCommandWithArgumentList<Logs>- Parameters:
names- theListofArgumentsthat appear at the end of the command lineargs- the new command to add- Returns:
- a copy of this
CommandWithArgumentListwithout the specified command argumentsArguments
-
-