You can check out the EventFlow project here https://github.com/Azure/diagnostics-eventflow
You can use that library to have multiple sources and multiple targets for you logs. In your case, you can have two outputs as shown below and when the LTE is available your logs will get sent to AppInsights and in its absence you will still log it in the local file.
{
"inputs": [
{
"type": "Trace",
"traceLevel": "Warning"
}
],
"outputs": [
// Please update the instrumentationKey.
{
"type": "ApplicationInsights",
"instrumentationKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
},
{
"type": "StdOutput"
}
],
"schemaVersion": "2016-08-11"
}
Please note that at the current state it will log to StdOut only, but you can easily make it write to a file. You may refer this question on how to divert it to a file How to Save Console.WriteLine Output to Text File
Hope this helps