|
|
@ -479,23 +479,20 @@ is_loggable(Msg, SeverityThreshold, MyName) when is_integer(SeverityThreshold) - |
|
|
|
rumMsg:severity_as_int(Msg) =< SeverityThreshold orelse |
|
|
|
lists:member(MyName, rumMsg:destinations(Msg)). |
|
|
|
|
|
|
|
%% When logRoot option is provided, get the real path to a file |
|
|
|
parsePath(RelPath) -> |
|
|
|
RelPath2 = case rumUtil:get_env(logRoot, undefined) of |
|
|
|
{ok, LogRoot} when is_list(LogRoot) -> % Join relative path |
|
|
|
%% check if the given RelPath contains LogRoot, if so, do not add |
|
|
|
%% it again; see gh #304 |
|
|
|
case filename:dirname(RelPath) of |
|
|
|
"." -> |
|
|
|
filename:join(LogRoot, RelPath); |
|
|
|
false -> |
|
|
|
RelPath |
|
|
|
end; |
|
|
|
undefined -> % No logRoot given, keep relative path |
|
|
|
RelPath |
|
|
|
end, |
|
|
|
%% see #534 make sure c:cd can't change file path, trans filename to abs name |
|
|
|
filename:absname(RelPath2). |
|
|
|
NewRelPath = |
|
|
|
case rumUtil:get_env(logRoot, undefined) of |
|
|
|
undefined -> |
|
|
|
RelPath; |
|
|
|
LogRoot -> |
|
|
|
case filename:dirname(RelPath) of |
|
|
|
"." -> |
|
|
|
filename:join(LogRoot, RelPath); |
|
|
|
false -> |
|
|
|
RelPath |
|
|
|
end |
|
|
|
end, |
|
|
|
filename:absname(NewRelPath). |
|
|
|
|
|
|
|
%% Find a file among the already installed handlers. |
|
|
|
%% |
|
|
|