ReopenableFilesExt

Undocumented in source.

Constructors

this
this(SignalExt signal_ext, int reopen_signal)

Constructor.

Members

Functions

atExit
void atExit(IApplication app, istring[] args, int status, ExitException exception)
onExitException
ExitException onExitException(IApplication app, istring[] args, ExitException exception)

Unused IApplicationExtension method.

onSignal
void onSignal(int signal)

Signal handler. Called by SignalExt when a signal occurs. Reopens all log files.

order
int order()

Required by ISignalExtExtension.

postRun
void postRun(IApplication app, istring[] args, int status)

Unused IApplicationExtension method.

preRun
void preRun(IApplication app, istring[] args)

Unused IApplicationExtension method.

register
void register(File file)

Registers the specified file, to be reopened when reopenAll() is called.

reopenAll
void reopenAll()

Reopens all registered files.

reopenFile
bool reopenFile(cstring file_path)

Reopens all registered files with the given path

setupSignalHandler
void setupSignalHandler(SignalExt signal_ext, int reopen_signal)

Registers this extension with the signal extension and activates the handling of the specified signal, which will cause the registered files to be reopened.

setupUnixSocketHandler
void setupUnixSocketHandler(UnixSocketExt unix_socket_ext, istring reopen_command)

Registers this extension with the unix socket extension and activates the handling of the specified unix socket command, which will cause reopening files specified as arguments to the command.

Inherited Members

From IApplicationExtension

IApplication
alias IApplication = .IApplication

Alias of IApplication, for use by implementing classes without needing to import ocean.util.app.model.IApplication.

preRun
void preRun(IApplication app, istring[] args)

Function executed before the program runs.

postRun
void postRun(IApplication app, istring[] args, int status)

Function executed after the program runs.

atExit
void atExit(IApplication app, istring[] args, int status, ExitException exception)

Function executed at program exit.

onExitException
ExitException onExitException(IApplication app, istring[] args, ExitException exception)

Function executed if (and only if) an ExitException was thrown.

From ISignalExtExtension

onSignal
void onSignal(int signum)

Called when the SignalExt is notified of a signal.

Meta