@@ -433,8 +433,8 @@ private static FunctionMetadata ParseFunctionMetadata(string functionName, JObje
433
433
}
434
434
435
435
// A function can be disabled at the trigger or function level
436
- if ( IsDisabled ( functionName , triggerDisabledValue ) ||
437
- IsDisabled ( functionName , ( JValue ) configMetadata [ "disabled" ] ) )
436
+ if ( IsDisabled ( triggerDisabledValue ) ||
437
+ IsDisabled ( ( JValue ) configMetadata [ "disabled" ] ) )
438
438
{
439
439
functionMetadata . IsDisabled = true ;
440
440
}
@@ -492,6 +492,11 @@ private Collection<FunctionDescriptor> ReadFunctions(ScriptHostConfiguration con
492
492
continue ;
493
493
}
494
494
495
+ if ( metadata . IsDisabled )
496
+ {
497
+ TraceWriter . Info ( string . Format ( "Function '{0}' is disabled" , functionName ) ) ;
498
+ }
499
+
495
500
// determine the primary script
496
501
string [ ] functionFiles = Directory . EnumerateFiles ( scriptDir ) . Where ( p => Path . GetFileName ( p ) . ToLowerInvariant ( ) != ScriptConstants . FunctionMetadataFileName ) . ToArray ( ) ;
497
502
if ( functionFiles . Length == 0 )
@@ -820,19 +825,6 @@ private void OnFileChanged(object sender, FileSystemEventArgs e)
820
825
}
821
826
}
822
827
823
- private static bool IsDisabled ( string functionName , JValue disabledValue )
824
- {
825
- if ( disabledValue != null && IsDisabled ( disabledValue ) )
826
- {
827
- // TODO: this needs to be written to the TraceWriter, not
828
- // Console
829
- Console . WriteLine ( string . Format ( CultureInfo . InvariantCulture , "Function '{0}' is disabled" , functionName ) ) ;
830
- return true ;
831
- }
832
-
833
- return false ;
834
- }
835
-
836
828
private static bool IsDisabled ( JToken isDisabledValue )
837
829
{
838
830
if ( isDisabledValue != null )
0 commit comments