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

Adds ParseLogs #370

Merged
merged 7 commits into from
Nov 8, 2017
Merged

Adds ParseLogs #370

merged 7 commits into from
Nov 8, 2017

Conversation

montymxb
Copy link
Contributor

@montymxb montymxb commented Nov 7, 2017

This adds ParseLogs to allow reading of parse's server-side logs in a read-only fashion. The endpoint utilized is the same that provides the logs for the dashboard. Logs are returned as an array of log entries, making parsing of log info conveniently accessible from this sdk.

Logs can be retrieved like so.

// get last 100 info logs, sorted in descending order
$logs = ParseLogs::getInfoLogs();

// get last 100 info logs, sorted in descending order
$logs = ParseLogs::getErrorLogs();

// logs can be retrieved with further specificity
// get 10 logs from a date up to a date in ascending order
$logs = ParseLogs::getInfoLogs(10, $fromDate, $untilDate, 'asc');

// above can be done for 'getErrorLogs' as well

@montymxb montymxb added this to the 1.4.0 milestone Nov 7, 2017
@codecov
Copy link

codecov bot commented Nov 8, 2017

Codecov Report

Merging #370 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #370      +/-   ##
==========================================
+ Coverage   98.93%   98.98%   +0.04%     
==========================================
  Files          36       37       +1     
  Lines        3389     3455      +66     
==========================================
+ Hits         3353     3420      +67     
+ Misses         36       35       -1
Impacted Files Coverage Δ
src/Parse/HttpClients/ParseStreamHttpClient.php 98.93% <100%> (+0.97%) ⬆️
src/Parse/ParseLogs.php 100% <100%> (ø)
src/Parse/ParseConfig.php 100% <0%> (ø) ⬆️
src/Parse/ParseSession.php 100% <0%> (ø) ⬆️
src/Parse/ParseUser.php 98.51% <0%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f3dffe...1388995. Read the comment docs.

@montymxb montymxb merged commit f72cc45 into parse-community:master Nov 8, 2017
@montymxb montymxb deleted the script-logs branch November 8, 2017 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant