Commit Graph

12 Commits

Author SHA1 Message Date
tidwall 517bc57e9c Ensure inlined logs
Move the LogJSON check into the log function so that the caller
function can be inlined. This is helpful for hot functions like
`log.Debug` where it's likely that the `-vv` flag is not set thus
the to avoid the extra function call.
2021-12-28 16:33:46 -07:00
Benjamin Ramser bd5f8ddccd fix: disable caller 2021-12-28 11:18:44 +01:00
Benjamin Ramser 20cc624918 feat: add option to cmd, add default config
feat: add zap logger

test: add additional

refactor: dont export logger, use set/get/build

fix: getter and benchmark

feat: extend server config with log configuration

fix: log config write

fix: log
2021-12-26 16:06:34 +01:00
tidwall a3c808e97f Increase verbosity for warning messages 2021-10-01 07:45:37 -07:00
tidwall 6b08f7fa9e Code cleanup
- Removed unused functions and variables
- Wrapped client formatted errors
- Updated deprecated packages
- Changed suggested code patterns
2021-03-31 08:13:44 -07:00
tidwall 9ac25647ad Expose log output writer 2021-02-18 15:34:01 -07:00
tidwall c084aeedc2 Code cleanup
This commit cleans up various Go code in the internal directory.
- Ensures comments on exported functions
- Changes all *Server receiver in all files to be "s", instead
  of mixed "c", "s", "server", etc.
- Silenced Go warnings for if/else with returns.
- Cleaned up import ordering.
2019-10-30 10:17:59 -07:00
Oleg Ginzburg 80b2d4c5a8 log: fix typo in Fatalf func
fixed for x1b[31m[FATA] output
2019-05-17 13:24:05 +03:00
tidwall 60b054d58c Fixed test 2018-10-29 08:16:04 -07:00
tidwall e15cfb66d1 Inline optimization 2018-10-27 07:08:24 -07:00
tidwall ccd6975f5f Fix some tests 2018-10-22 14:52:48 -07:00
tidwall 6257ddba78 Faster point in polygon / GeoJSON updates
The big change is that the GeoJSON package has been completely
rewritten to fix a few of geometry calculation bugs, increase
performance, and to better follow the GeoJSON spec RFC 7946.

GeoJSON updates

- A LineString now requires at least two points.
- All json members, even foreign, now persist with the object.
- The bbox member persists too but is no longer used for geometry
  calculations. This is change in behavior. Previously Tile38 would
  treat the bbox as the object's physical rectangle.
- Corrections to geometry intersects and within calculations.

Faster spatial queries

- The performance of Point-in-polygon and object intersect operations
  are greatly improved for complex polygons and line strings. It went
  from O(n) to roughly O(log n).
- The same for all collection types with many children, including
  FeatureCollection, GeometryCollection, MultiPoint, MultiLineString,
  and MultiPolygon.

Codebase changes

- The pkg directory has been renamed to internal
- The GeoJSON internal package has been moved to a seperate repo at
  https://github.com/tidwall/geojson. It's now vendored.

Please look out for higher memory usage for datasets using complex
shapes. A complex shape is one that has 64 or more points. For these
shapes it's expected that there will be increase of least 54 bytes per
point.
2018-10-13 04:30:48 -07:00