File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/WebJobs.Script/Diagnostics Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,26 @@ public FastLogger(string accountConnectionString)
2727 this . _writer = LogFactory . NewWriter ( containerName , table ) ;
2828 }
2929
30+
31+ // SDK notification gives us the full name, which came from Ref.Emit.
32+ // It's 'Type.Method'. We just want 'Method'
33+ static string GetShortName ( string fullname )
34+ {
35+ int i = fullname . LastIndexOf ( '.' ) ;
36+ if ( i != - 1 )
37+ {
38+ return fullname . Substring ( i + 1 ) ;
39+ }
40+ return fullname ;
41+ }
42+
3043 public async Task AddAsync ( FunctionInstanceLogEntry item , CancellationToken cancellationToken = default ( CancellationToken ) )
3144 {
3245 // Convert Host to Protocol so we can log it
3346 var settings = new JsonSerializerSettings { NullValueHandling = NullValueHandling . Ignore } ;
3447 var jsonClone = JsonConvert . SerializeObject ( item , settings ) ;
3548 var item2 = JsonConvert . DeserializeObject < FunctionInstanceLogItem > ( jsonClone ) ;
49+ item2 . FunctionName = GetShortName ( item2 . FunctionName ) ;
3650 await _writer . AddAsync ( item2 ) ;
3751 }
3852
You can’t perform that action at this time.
0 commit comments