SeasLog::closeLoggerStream

Manually release stream flow from logger

&reftitle.description; public static `bool` `SeasLog::closeLoggerStream` `int` `model` `string` `logger`

Manually release stream flow from logger. SeasLog caches the stream handle opened by the log logger to save the overhead of creating a stream. The handle will be automatically released at the end of the request. If in CLI mode, the process will also automatically release when it exits. Or you can use the following functions to manually release(manually release function needs to update SeasLog 1.8.6 or updated version).

&reftitle.parameters;

`model`

- Constant int.

  - SEASLOG_CLOSE_LOGGER_STREAM_MOD_ALL
  - SEASLOG_CLOSE_LOGGER_STREAM_MOD_ASSIGN

`logger`

- The logger name.

&reftitle.returnvalues;

Return TRUE on released stream flow success, FALSE on failure.

&reftitle.examples;

### `SeasLog::closeLoggerStream` example

    <?php

    var_dump(SeasLog::closeLoggerStream());
    var_dump(SeasLog::closeLoggerStream(SEASLOG_CLOSE_LOGGER_STREAM_MOD_ALL));
    var_dump(SeasLog::closeLoggerStream(SEASLOG_CLOSE_LOGGER_STREAM_MOD_ASSIGN, 'logger_name'));

    ?>

&example.outputs.similar;

    bool(true)
    bool(true)
    bool(true)

&reftitle.seealso;

- `SeasLog::setLogger`
- `SeasLog::getLastLogger`