Skip to content

Commit 26d34c4

Browse files
committed
logs
1 parent 475bf56 commit 26d34c4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

FunctionAppCSVToJSON/CSVToJSON.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)