@@ -22,7 +22,7 @@ public static class CSVToJSON
2222 [ FunctionName ( "CSVToJSON" ) ]
2323 public static IActionResult Run ( [ HttpTrigger ( AuthorizationLevel . Function , "get" , "post" , Route = null ) ] HttpRequest req , ILogger log )
2424 {
25- log . Info ( "C# HTTP trigger function CSVToJSON processed a request." ) ;
25+ log . LogInformation ( "C# HTTP trigger function CSVToJSON processed a request." ) ;
2626
2727 string fileName = req . Query [ "fileName" ] ;
2828 string errorMessage = "" ;
@@ -35,7 +35,7 @@ public static IActionResult Run([HttpTrigger(AuthorizationLevel.Function, "get",
3535 if ( fileName == null )
3636 {
3737 errorMessage = "Please pass a fileName on the query string or in the request body" ;
38- log . Info ( "BadRequest: " + errorMessage ) ;
38+ log . LogInformation ( "BadRequest: " + errorMessage ) ;
3939 return new BadRequestObjectResult ( errorMessage ) ;
4040 }
4141
@@ -44,11 +44,11 @@ public static IActionResult Run([HttpTrigger(AuthorizationLevel.Function, "get",
4444 if ( csvData == null )
4545 {
4646 errorMessage = "Please pass the csv data in using the csv attribute in the request body" ;
47- log . Info ( "BadRequest: " + errorMessage ) ;
47+ log . LogInformation ( "BadRequest: " + errorMessage ) ;
4848 return new BadRequestObjectResult ( errorMessage ) ;
4949 }
5050
51- log . Info ( "csv data is present." ) ;
51+ log . LogInformation ( "csv data is present." ) ;
5252
5353
5454
@@ -69,7 +69,7 @@ public static IActionResult Run([HttpTrigger(AuthorizationLevel.Function, "get",
6969
7070
7171
72- log . Info ( string . Format ( "There are {0} lines in the csv records content {1}." , records . Count ( ) , fileName ) ) ;
72+ log . LogInformation ( string . Format ( "There are {0} lines in the csv records content {1}." , records . Count ( ) , fileName ) ) ;
7373
7474
7575
0 commit comments