google / google/or-tools

Be able to have a LogHandler from wrapped languages

Open
#2,489 1 comment 0 reactions 1 assignee Claimed by @Mizux View on GitHub
Feature Request Lang: .NET Lang: C++ Lang: Java Lang: Python OS: FreeBSD OS: Linux OS: Mac OS: Windows
Dominant language
C++
Stars
14.1k
Forks
2.5k
Avg merge
8h 39m
Merged PRs (30d)
72

Description

extract from #2245 for the LogHandler part

## ToDo list

* [ ] Python support:
* [ ] Be able to control log handler from Python
* [ ] Java support:
* [ ] Be able to control log handler from Java
* [ ] .Net support:
* [ ] Be able to control log handler from .Net

## Devnote:
### .NET
According to Ozzah:
> I suggest `Solver.EnableOutput()` needs an overhaul. Specifically, I may not want to write directly to the console and I may not want to write it to a file. In C#, it's common to use `ILogger` to record information, either to screen, file, database, Kafka, etc.
In C#, when we create and start a `Process`, we can override the `Process.StandardInput`, `Process.StandardOutput`, and `Process.StandardError` with our own `StreamReader` and `StreamWriter` implementations.
I think it would be useful to be able to supply a `StreamWriter` to `Solver.EnableOutput()`, and that way it's up to us to decide what to do with that output.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.