Skip to content

Commit 9664f5f

Browse files
committed
Using correct log property keys
1 parent ef8bfb8 commit 9664f5f

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/WebJobs.Script.WebHost/Controllers/AdminController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ public IHttpActionResult Log(IEnumerable<HostLogEntry> logEntries)
166166
var logLevel = Utility.ToLogLevel(traceEvent.Level);
167167
var logData = new Dictionary<string, object>
168168
{
169-
["Source"] = logEntry.Source,
170-
["FunctionName"] = logEntry.FunctionName
169+
[ScriptConstants.TracePropertySourceKey] = logEntry.Source,
170+
[ScriptConstants.TracePropertyFunctionNameKey] = logEntry.FunctionName
171171
};
172172
_logger.Log(logLevel, 0, logData, null, (s, e) => logEntry.Message);
173173
}

src/WebJobs.Script/Diagnostics/FileTraceWriter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ private void OnFlushLogs(object sender, ElapsedEventArgs e)
254254
/// </summary>
255255
internal void SetLogFile()
256256
{
257+
_logDirectory.Refresh();
257258
if (!_logDirectory.Exists)
258259
{
259260
_logDirectory.Create();

src/WebJobs.Script/ScriptConstants.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public static class ScriptConstants
2020

2121
public const string TracePropertyPrimaryHostKey = "MS_PrimaryHost";
2222
public const string TracePropertyFunctionNameKey = "MS_FunctionName";
23+
public const string TracePropertySourceKey = "MS_Source";
2324
public const string TracePropertyEventNameKey = "MS_EventName";
2425
public const string TracePropertyEventDetailsKey = "MS_EventDetails";
2526
public const string TracePropertyIsUserTraceKey = "MS_IsUserTrace";

0 commit comments

Comments
 (0)