Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added info about logs

...

The resulting body contains the name of the TM, as given in the POST request.


LOGGING:

You can optionally set here or in other requests with JSON body logging level that could impact performance.

You can set the next levels:

  • 0 - DEVELOP - could make code work really slow, should be used only when debugging some specific places in code, like binary search in files, etc.
  • 1 - DEBUG - logging values of variables
  • 2 - INFO - logging top-level functions entrances, return codes, etc.
  • 3 - WARNING - logging if we reached some commented or hardcoded code.  Usually commented code  here is replaced with new code, and if not, it's marked as ERROR level
  • 4 - ERROR - errors, why and where something fails during parsing, search, etc
  • 5 - FATAL -  you shouldn't reach this code, something is really wrongOther values would be ignored.  The set level would stay the same till you change it in a new request or close the app. Logs suppose to be written into a file with date\time name under ~/.OtmMemoryService/Logs and errors/fatal are supposed to be duplicated in another log file with FATAL suffices 


To OpenTM2 – without data / creating an empty TM:

{
sourceLang: “en”, // the source language is required for a new TM
name: „TM Name“,
[loggingThreshold:"2"]

}

Raw POST to OpenTM2 – with provided import file:

...

timeStamp: '',

context: '',

addInfo: '',

[loggingThreshold:"2"]

}

The result from the server contains the same data as posted to the server. No additonal ID is added, since the entries are identified by the whole source string instead by an ID, only the timestamp is added.

...

markupTable: 'translate5', // can be empty

context: „xyz“, // can be empty

[loggingThreshold:"2"]

}

From OpenTM2 HTTP 200 OK:

...

msSearchAfterNumResults: 100 //number of milliseconds the search will continue, after the first result is found. All additional results that are found in this additional time will also be returned until numResults is reached. If numResults is reached before msSearchAfterNumResults is reached, the search will abort. If msSearchAfterNumResults is reached before numResults is reached, search is also aborted. All found results are delivered in both cases.

[loggingThreshold:"2"]

}

From OpenTM2 HTTP 200 OK:

...