Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be able to control Flags from wrapped languages #2245

Closed
6 tasks done
Mizux opened this issue Nov 25, 2020 · 2 comments
Closed
6 tasks done

Be able to control Flags from wrapped languages #2245

Mizux opened this issue Nov 25, 2020 · 2 comments
Assignees
Labels
Feature Request Missing Feature/Wrapper Lang: Java Java wrapper issue Lang: .NET .Net wrapper issue Lang: Python Python wrapper issue OS: FreeBSD FreeBSD OS OS: Linux GNU/Linux OS OS: Mac MacOS OS: Windows Windows OS
Milestone

Comments

@Mizux
Copy link
Collaborator

Mizux commented Nov 25, 2020

Following #2201, the next step could be:

  • Python support:
    • Be able to control flags from Python
  • Java support:
    • Be able to control flags from Java
  • .Net support:
    • Be able to control flags from .Net

EDIT: move LogHandler support in #2489

note: I move these items from #2201, since it's an other optional step.
note: Protobuf custom logging provides LogHandler and can be used as a good starting point
ref: https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/stubs/logging.h

@Mizux Mizux added Feature Request Missing Feature/Wrapper OS: Windows Windows OS OS: Linux GNU/Linux OS OS: Mac MacOS Lang: Java Java wrapper issue Lang: .NET .Net wrapper issue Lang: Python Python wrapper issue labels Nov 25, 2020
@Mizux Mizux added this to the v8.2 milestone Nov 25, 2020
@Mizux Mizux added this to To do in Feature Requests via automation Nov 25, 2020
@Mizux Mizux self-assigned this Nov 25, 2020
@Mizux Mizux added this to To do in ToDo via automation Nov 25, 2020
@Mizux Mizux changed the title Be able to control Flag and LogHandler from wrapped language Be able to control Flag and LogHandler from wrapped languages Nov 25, 2020
@Mizux Mizux changed the title Be able to control Flag and LogHandler from wrapped languages Be able to control Flags and LogHandler from wrapped languages Nov 25, 2020
@Mizux Mizux modified the milestones: v8.2, v8.3 Feb 10, 2021
@Mizux Mizux moved this from To do to In progress in ToDo Mar 17, 2021
@Mizux Mizux moved this from To do to In progress in Feature Requests Mar 18, 2021
@Mizux
Copy link
Collaborator Author

Mizux commented Mar 26, 2021

in Python we now have:

from ortools.init import pywrapinit

pywrapinit.CppBridge.InitLogging('integer_programming.py')
cpp_flags = pywrapinit.CppFlags()
cpp_flags.logtostderr = True
cpp_flags.log_prefix = False
pywrapinit.CppBridge.SetFlags(cpp_flags)

@Mizux
Copy link
Collaborator Author

Mizux commented Mar 26, 2021

In .Net:

using Google.OrTools.Init;

CppBridge.InitLogging("csintegerprogramming.cs");
CppFlags flags = new CppFlags();
flags.logtostderr = true;
flags.log_prefix = false;
CppBridge.SetFlags(flags);

@Mizux Mizux changed the title Be able to control Flags and LogHandler from wrapped languages Be able to control Flags from wrapped languages Apr 13, 2021
@Mizux Mizux added the OS: FreeBSD FreeBSD OS label Apr 13, 2021
@Mizux Mizux closed this as completed Apr 13, 2021
Feature Requests automation moved this from In progress to Done Apr 13, 2021
ToDo automation moved this from In progress to Done Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Missing Feature/Wrapper Lang: Java Java wrapper issue Lang: .NET .Net wrapper issue Lang: Python Python wrapper issue OS: FreeBSD FreeBSD OS OS: Linux GNU/Linux OS OS: Mac MacOS OS: Windows Windows OS
Projects
ToDo
  
Done
Development

No branches or pull requests

1 participant