Sets the size of the log of a trace stream.
Posix Trace Library (libposixtrace.a)
The posix_trace_attr_setlogsize subroutine sets the maximum allowed size in bytes in the log-max-size attribute of the attr object, using the size value specified by the logsize parameter. If the logsize parameter is too small regarding the stream size, the posix_trace_attr_setlogsize subroutine does not fail. It sets the log-max-size attribute in order to be able to write at least one stream in the log file. Further calls to the posix_trace_create or posix_trace_create_withlog subroutines with such an attributes object will not fail.
The size of the trace log is used if the log-full-policy attribute of the attr object is set to the POSIX_TRACE_LOOP value or the POSIX_TRACE_UNTIL_FULL value. If the attr object is set to the POSIX_TRACE_APPEND value. The system ignores the log-max-size attribute in this case.
If this subroutine is called with a non-initialized attributes object as parameter, the result is not specified.
Item | Description |
---|---|
attr | Specifies the trace attributes object. |
logsize | Specifies where the log-max-size attribute, in bytes, will be attained. |
Upon successful completion, this subroutine returns a value of zero. Otherwise, it returns the corresponding error number.
Item | Description |
---|---|
EINVAL | The attr parameter is null or the other parameter is not valid. |