Fix TdApi.LogStreamFile usage in examples.
GitOrigin-RevId: 25af774fee360bd1071ef911d78e50a25b78372a
This commit is contained in:
parent
e104766de3
commit
62d7423bc3
@ -216,7 +216,7 @@ namespace TdExample
|
|||||||
{
|
{
|
||||||
// disable TDLib log
|
// disable TDLib log
|
||||||
Td.Client.Execute(new TdApi.SetLogVerbosityLevel(0));
|
Td.Client.Execute(new TdApi.SetLogVerbosityLevel(0));
|
||||||
if (Td.Client.Execute(new TdApi.SetLogStream(new TdApi.LogStreamFile("tdlib.log", 1 << 27))) is TdApi.Error)
|
if (Td.Client.Execute(new TdApi.SetLogStream(new TdApi.LogStreamFile("tdlib.log", 1 << 27, false))) is TdApi.Error)
|
||||||
{
|
{
|
||||||
throw new System.IO.IOException("Write access to the current directory is required");
|
throw new System.IO.IOException("Write access to the current directory is required");
|
||||||
}
|
}
|
||||||
|
@ -305,7 +305,7 @@ public final class Example {
|
|||||||
public static void main(String[] args) throws InterruptedException {
|
public static void main(String[] args) throws InterruptedException {
|
||||||
// disable TDLib log
|
// disable TDLib log
|
||||||
Client.execute(new TdApi.SetLogVerbosityLevel(0));
|
Client.execute(new TdApi.SetLogVerbosityLevel(0));
|
||||||
if (Client.execute(new TdApi.SetLogStream(new TdApi.LogStreamFile("tdlib.log", 1 << 27, true))) instanceof TdApi.Error) {
|
if (Client.execute(new TdApi.SetLogStream(new TdApi.LogStreamFile("tdlib.log", 1 << 27, false))) instanceof TdApi.Error) {
|
||||||
throw new IOError(new IOException("Write access to the current directory is required"));
|
throw new IOError(new IOException("Write access to the current directory is required"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ namespace TdApp
|
|||||||
_handler = new MyClientResultHandler(this);
|
_handler = new MyClientResultHandler(this);
|
||||||
|
|
||||||
Td.Client.Execute(new TdApi.SetLogVerbosityLevel(0));
|
Td.Client.Execute(new TdApi.SetLogVerbosityLevel(0));
|
||||||
Td.Client.Execute(new TdApi.SetLogStream(new TdApi.LogStreamFile(Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "log"), 1 << 27)));
|
Td.Client.Execute(new TdApi.SetLogStream(new TdApi.LogStreamFile(Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "log"), 1 << 27, false)));
|
||||||
|
|
||||||
System.Threading.Tasks.Task.Run(() =>
|
System.Threading.Tasks.Task.Run(() =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user