| Thread overview | |||||||
|---|---|---|---|---|---|---|---|
|
November 08, 2016 Question about dsfml.system.err | ||||
|---|---|---|---|---|
| ||||
I need to see errors from dsfml.system.err, but it doesn't write to terminal as I expected.
The general problem is that I cannot listen any port by tcplistener. And listen method is:
Status accept(TcpSocket socket)
{
import dsfml.system.string;
Status toReturn = sfTcpListener_accept(sfPtr, socket.sfPtr);
err.write(dsfml.system.string.toString(sfErr_getOutput()));
return toReturn;
}
so, as you can see, there is "err.write". I need to see which error is wrining ro "err"...
Is it possible to redeclate "err" File() object?
:(
| ||||
November 08, 2016 Re: Question about dsfml.system.err | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Konstantin Kutsevalov | ADD:
I tried to open other stream in main()
```
...
import dsfml.system.err;
int main(string[] args)
{
err.open("errors.log", "a");
err.write("test\n");
....
}
...
```
but as can I see, that hasn't any effect for tcplistener module...
| |||
November 08, 2016 Re: Question about dsfml.system.err | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Konstantin Kutsevalov | On Tuesday, 8 November 2016 at 16:34:04 UTC, Konstantin Kutsevalov wrote:
> ADD:
>
> I tried to open other stream in main()
>
> ```
> ...
> import dsfml.system.err;
>
> int main(string[] args)
> {
> err.open("errors.log", "a");
> err.write("test\n");
> ....
> }
> ...
> ```
>
> but as can I see, that hasn't any effect for tcplistener module...
OK ... problem with tcplistener solved, just a code mistake. But the question is actual.
| |||
November 08, 2016 Re: Question about dsfml.system.err | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Konstantin Kutsevalov | On 11/8/16 11:48 AM, Konstantin Kutsevalov wrote:
> On Tuesday, 8 November 2016 at 16:34:04 UTC, Konstantin Kutsevalov wrote:
>> ADD:
>>
>> I tried to open other stream in main()
>>
>> ```
>> ...
>> import dsfml.system.err;
>>
>> int main(string[] args)
>> {
>> err.open("errors.log", "a");
>> err.write("test\n");
>> ....
>> }
>> ...
>> ```
>>
>> but as can I see, that hasn't any effect for tcplistener module...
>
> OK ... problem with tcplistener solved, just a code mistake. But the
> question is actual.
I can honestly say, I don't know what dsfml is or any of the code you have posted.
-Steve
| |||
November 09, 2016 Re: Question about dsfml.system.err | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On Tuesday, 8 November 2016 at 19:00:15 UTC, Steven Schveighoffer wrote:
> On 11/8/16 11:48 AM, Konstantin Kutsevalov wrote:
>> On Tuesday, 8 November 2016 at 16:34:04 UTC, Konstantin Kutsevalov wrote:
>>> ADD:
>>>
>>> I tried to open other stream in main()
>>>
>>> ```
>>> ...
>>> import dsfml.system.err;
>>>
>>> int main(string[] args)
>>> {
>>> err.open("errors.log", "a");
>>> err.write("test\n");
>>> ....
>>> }
>>> ...
>>> ```
>>>
>>> but as can I see, that hasn't any effect for tcplistener module...
>>
>> OK ... problem with tcplistener solved, just a code mistake. But the
>> question is actual.
>
> I can honestly say, I don't know what dsfml is or any of the code you have posted.
>
> -Steve
oh, it's ok because it's all work fine, I just was too inattentive.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply