...
Here is the list of flags:
Most useful flags | ||||
---|---|---|---|---|
name | description | type | default value | |
1 | allowedram | Sets amount RAM(in MB) allowed for service to use | int32 | 500 |
2 | localhostonly | Should we use localhost or external address for service - used only for development | bool | false |
3 | port | What port to listen on | int32 | 4080 |
4 | servicename | Sets service name to use in URL | string | t5memory |
5 | servicethreads | Sets amount of worker threads for service(for proxygen) | int32 | 1 |
6 | t5loglevel | Sets t5memory log level threshold from DEVELOP(0) to TRANSACTION(6)[disabled] | int32 | 0 |
7 | triplesthreshold | Sets threshold to pre-fuzzy filtering based on hashes of neighbor tokens | int32 | 33 |
8 | timeout | Sets the timeout for service request handling | int32 | 3600 |
9 | ||||
10 | v | Show all VLOG(m) messages for m <= this. Overridable by --vmodule. This should be used to enable DEBUG(v=1) and DEVELOP(v=2) logs. If set to v=1, all logs, starting from DEBUG(1) level, would be added to the buffer of logs(instead of only request data), which would be printed in case of an error. If set to v=2, all logs would ignore the buffer and would be printed, starting from level=0(develop logs) | int32 | 0 |
11 | alsologtostderr | log messages go to stderr in addition to logfiles | bool | false |
12 | logtostderr | log messages go to stderr instead of logfiles | bool | false |
13 | log_dir | If specified, logfiles are written into this directory instead of the default logging directory. | string | ~/.t5memory/LOG/ |
14 | stderrthreshold | log messages at or above this level are copied to stderr in addition to logfiles. This flag obsoletes --alsologtostderr. | int32 | 2 |
15 | max_log_size | approx. maximum log file size (in MB). A value of 0 will be silently overridden to 1. | int32 | 1800 |
16 | minloglevel | Messages logged at a lower level than this don't actually get logged anywhere | int32 | 0 |
17 | stop_logging_if_full_disk | Stop attempting to log to disk if the disk is full | bool | false |
18 | drop_log_memory | Drop in-memory buffers of log contents. Logs can grow very quickly and they are rarely read before they need to be evicted from memory. Instead, drop them from memory as soon as they are flushed to disk. | bool | true |
Other flags | ||
---|---|---|
Flags from /build/gflags-0sowem/gflags-2.2.2/src/gflags.cc: Flags from /build/gflags-0sowem/gflags-2.2.2/src/gflags_completions.cc: Flags from /build/gflags-0sowem/gflags-2.2.2/src/gflags_reporting.cc: Flags from /home/libs/proxygen/_build/deps/folly/folly/detail/MemoryIdler.cpp: Flags from /home/libs/proxygen/_build/deps/folly/folly/executors/IOThreadPoolExecutor.cpp: Flags from /home/libs/proxygen/_build/deps/folly/folly/executors/ThreadPoolExecutor.cpp: Flags from /home/libs/proxygen/_build/deps/folly/folly/experimental/observer/detail/ObserverManager.cpp: Flags from /home/libs/proxygen/_build/deps/folly/folly/synchronization/Hazptr.cpp: Flags from /home/libs/proxygen/_build/deps/wangle/wangle/ssl/SSLSessionCacheManager.cpp: Flags from /home/libs/proxygen/lib/utils/ZlibStreamCompressor.cpp: Flags from /home/or/workspace/translate5/translate5-tm-service-source/source/RestAPI/ProxygenHandler.cpp: Flags from src/logging.cc: Flags from src/utilities.cc: Flags from src/vlog_is_on.cc: |
Logs
For logging t5memory uses glog library. t5memory has it's own logging levels (DEVELOP=0, DEBUG=1, INFO=2, WARNIGN=3, ERROR=4, FATAL=5, TRANSACTION=6), that maps to 4 levels of glog
t5memory log → glog log
DEVELOP = INFO && VLOG>=2
...
If you would set --v=2, then it would omit buffer and print logs directly, starting from DEVELOP.
You can disable some logs with --minloglevel. Also, if that makes sense, old logging threshold could be implemented to set some bevahiour of --v=1 or --v=2, but to filter some DEBUG and DEVELOP logs.
Build process
We are building t5memory in docker containers. To build t5memory you should build container with proxygen first. This would require a lot of resources(you should have at least 16 GB RAM and image would take 20 GB)
To build proxygen container you should go to folder where Dockerfile_proxygen is located(from 'translate5-tm-service-source/docker', but you need only dockerfile to build container) and run this command:
docker build -t translate5/proxygen -f Dockerfile_proxygen .
and then wait.
Then you can build t5memory from folder where Dockerfile(from 'translate5-tm-service-source/docker/') with command
docker build -t translate5/t5memory .
This would pull t5memory repository from github and would build t5memory from last commit
Alternatively you can call the same command from the project's root directory, this would build t5memory from local files instead of repo, which could be used for development.