Merge pull request #5740 from overleaf/em-gcp-logging-web

Improve GCP logging for web

GitOrigin-RevId: b304c87a3fe46c29189f665eb3daf22c23d6eb8f
This commit is contained in:
Eric Mc Sween 2021-11-10 08:40:18 -05:00 committed by Copybot
parent 3feca1ffc6
commit 5fc6d7dcb3
130 changed files with 521 additions and 281 deletions

View file

@ -12,7 +12,7 @@
const metrics = require('@overleaf/metrics')
metrics.initialize(process.env.METRICS_APP_NAME || 'web')
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const PlansLocator = require('./app/src/Features/Subscription/PlansLocator')
logger.initialize(process.env.METRICS_APP_NAME || 'web')
logger.logger.serializers.user = require('./app/src/infrastructure/LoggerSerializers').user

View file

@ -6,7 +6,7 @@ const Queues = require('../../infrastructure/Queues')
const uuid = require('uuid')
const _ = require('lodash')
const { expressify } = require('../../util/promises')
const { logger } = require('logger-sharelatex')
const { logger } = require('@overleaf/logger')
const analyticsEventsQueue = Queues.getQueue('analytics-events')
const analyticsEditingSessionsQueue = Queues.getQueue(

View file

@ -1,4 +1,4 @@
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const OError = require('@overleaf/o-error')
const AnalyticsRegistrationSourceHelper = require('./AnalyticsRegistrationSourceHelper')
const SessionManager = require('../../Features/Authentication/SessionManager')

View file

@ -5,7 +5,7 @@ const querystring = require('querystring')
const { URL } = require('url')
const Settings = require('@overleaf/settings')
const OError = require('@overleaf/o-error')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
function recordUTMTags() {
return function (req, res, next) {

View file

@ -4,7 +4,7 @@ const OError = require('@overleaf/o-error')
const LoginRateLimiter = require('../Security/LoginRateLimiter')
const UserUpdater = require('../User/UserUpdater')
const Metrics = require('@overleaf/metrics')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const querystring = require('querystring')
const Settings = require('@overleaf/settings')
const basicAuth = require('basic-auth-connect')

View file

@ -1,5 +1,5 @@
const AuthorizationManager = require('./AuthorizationManager')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const { ObjectId } = require('mongodb')
const Errors = require('../Errors/Errors')
const HttpErrorHandler = require('../Errors/HttpErrorHandler')

View file

@ -2,7 +2,7 @@ const BetaProgramHandler = require('./BetaProgramHandler')
const OError = require('@overleaf/o-error')
const UserGetter = require('../User/UserGetter')
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const SessionManager = require('../Authentication/SessionManager')
const BetaProgramController = {

View file

@ -1,7 +1,7 @@
const OError = require('@overleaf/o-error')
const { URL } = require('url')
const settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const V1Api = require('../V1/V1Api')
const sanitizeHtml = require('sanitize-html')

View file

@ -12,7 +12,7 @@
*/
let CaptchaMiddleware
const request = require('request')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const Settings = require('@overleaf/settings')
module.exports = CaptchaMiddleware = {

View file

@ -8,7 +8,7 @@ const SessionManager = require('../Authentication/SessionManager')
const EditorRealTimeController = require('../Editor/EditorRealTimeController')
const TagsHandler = require('../Tags/TagsHandler')
const Errors = require('../Errors/Errors')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const { expressify } = require('../../util/promises')
module.exports = {

View file

@ -3,7 +3,7 @@ const OError = require('@overleaf/o-error')
const { Project } = require('../../models/Project')
const ProjectGetter = require('../Project/ProjectGetter')
const ProjectHelper = require('../Project/ProjectHelper')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const ContactManager = require('../Contacts/ContactManager')
const PrivilegeLevels = require('../Authorization/PrivilegeLevels')
const TpdsProjectFlusher = require('../ThirdPartyDataStore/TpdsProjectFlusher')

View file

@ -19,7 +19,7 @@ const LimitationsManager = require('../Subscription/LimitationsManager')
const UserGetter = require('../User/UserGetter')
const CollaboratorsGetter = require('./CollaboratorsGetter')
const CollaboratorsInviteHandler = require('./CollaboratorsInviteHandler')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const Settings = require('@overleaf/settings')
const EmailHelper = require('../Helpers/EmailHelper')
const EditorRealTimeController = require('../Editor/EditorRealTimeController')

View file

@ -13,7 +13,7 @@
*/
const { ProjectInvite } = require('../../models/ProjectInvite')
const OError = require('@overleaf/o-error')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const CollaboratorsEmailHandler = require('./CollaboratorsEmailHandler')
const CollaboratorsHandler = require('./CollaboratorsHandler')
const UserGetter = require('../User/UserGetter')

View file

@ -1,4 +1,4 @@
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const { Project } = require('../../models/Project')
const ProjectGetter = require('../Project/ProjectGetter')
const UserGetter = require('../User/UserGetter')

View file

@ -21,7 +21,7 @@ if (Settings.redis.clsi_cookie_secondary != null) {
rclient_secondary = RedisWrapper.client('clsi_cookie_secondary')
}
const Cookie = require('cookie')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const Metrics = require('@overleaf/metrics')
const clsiCookiesEnabled =

View file

@ -3,7 +3,7 @@ const Settings = require('@overleaf/settings')
const request = require('request')
const ProjectGetter = require('../Project/ProjectGetter')
const ProjectEntityHandler = require('../Project/ProjectEntityHandler')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const { URL } = require('url')
const OError = require('@overleaf/o-error')

View file

@ -15,7 +15,7 @@
*/
let ClsiStateManager
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const crypto = require('crypto')
const ProjectEntityHandler = require('../Project/ProjectEntityHandler')

View file

@ -18,7 +18,7 @@ const Metrics = require('@overleaf/metrics')
const ProjectGetter = require('../Project/ProjectGetter')
const CompileManager = require('./CompileManager')
const ClsiManager = require('./ClsiManager')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const request = require('request')
const Settings = require('@overleaf/settings')
const SessionManager = require('../Authentication/SessionManager')

View file

@ -16,7 +16,7 @@ let ContactsController
const SessionManager = require('../Authentication/SessionManager')
const ContactManager = require('./ContactManager')
const UserGetter = require('../User/UserGetter')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const Modules = require('../../infrastructure/Modules')
module.exports = ContactsController = {

View file

@ -13,7 +13,7 @@
let CooldownManager
const RedisWrapper = require('../../infrastructure/RedisWrapper')
const rclient = RedisWrapper.client('cooldown')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const COOLDOWN_IN_SECONDS = 60 * 10

View file

@ -12,7 +12,7 @@
*/
let CooldownMiddleware
const CooldownManager = require('./CooldownManager')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
module.exports = CooldownMiddleware = {
freezeProject(req, res, next) {

View file

@ -2,7 +2,7 @@ const { promisify } = require('util')
const { promisifyMultiResult } = require('../../util/promises')
const request = require('request').defaults({ jar: false })
const OError = require('@overleaf/o-error')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const settings = require('@overleaf/settings')
const Errors = require('../Errors/Errors')

View file

@ -3,7 +3,7 @@ const OError = require('@overleaf/o-error')
const settings = require('@overleaf/settings')
const _ = require('underscore')
const async = require('async')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const metrics = require('@overleaf/metrics')
const { promisify } = require('util')

View file

@ -3,7 +3,7 @@ const OError = require('@overleaf/o-error')
const ProjectLocator = require('../Project/ProjectLocator')
const ProjectEntityHandler = require('../Project/ProjectEntityHandler')
const ProjectEntityUpdateHandler = require('../Project/ProjectEntityUpdateHandler')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const _ = require('lodash')
function getDocument(req, res, next) {

View file

@ -12,7 +12,7 @@
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
let ProjectDownloadsController
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const Metrics = require('@overleaf/metrics')
const ProjectGetter = require('../Project/ProjectGetter')
const ProjectZipStreamManager = require('./ProjectZipStreamManager')

View file

@ -1,7 +1,7 @@
let ProjectZipStreamManager
const archiver = require('archiver')
const async = require('async')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const ProjectEntityHandler = require('../Project/ProjectEntityHandler')
const ProjectGetter = require('../Project/ProjectGetter')
const FileStoreHandler = require('../FileStore/FileStoreHandler')

View file

@ -13,7 +13,7 @@
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const OError = require('@overleaf/o-error')
const Metrics = require('@overleaf/metrics')
const ProjectEntityUpdateHandler = require('../Project/ProjectEntityUpdateHandler')

View file

@ -14,7 +14,7 @@ const Errors = require('../Errors/Errors')
const HttpErrorHandler = require('../Errors/HttpErrorHandler')
const ProjectEntityUpdateHandler = require('../Project/ProjectEntityUpdateHandler')
const DocstoreManager = require('../Docstore/DocstoreManager')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const { expressify } = require('../../util/promises')
module.exports = {

View file

@ -1,5 +1,5 @@
const { callbackify } = require('util')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const metrics = require('@overleaf/metrics')
const Settings = require('@overleaf/settings')
const nodemailer = require('nodemailer')

View file

@ -1,6 +1,6 @@
let ErrorController
const Errors = require('./Errors')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const SessionManager = require('../Authentication/SessionManager')
const SamlLogHandler = require('../SamlLog/SamlLogHandler')
const HttpErrorHandler = require('./HttpErrorHandler')

View file

@ -1,4 +1,4 @@
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const Settings = require('@overleaf/settings')
function renderJSONError(res, message, info = {}) {

View file

@ -12,7 +12,7 @@
*/
const ExportsHandler = require('./ExportsHandler')
const SessionManager = require('../Authentication/SessionManager')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
module.exports = {
exportProject(req, res, next) {

View file

@ -20,7 +20,7 @@ const ProjectHistoryHandler = require('../Project/ProjectHistoryHandler')
const ProjectLocator = require('../Project/ProjectLocator')
const ProjectRootDocManager = require('../Project/ProjectRootDocManager')
const UserGetter = require('../User/UserGetter')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
let settings = require('@overleaf/settings')
const async = require('async')
let request = require('request')

View file

@ -13,7 +13,7 @@
*/
let FileHashManager
const crypto = require('crypto')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const fs = require('fs')
const _ = require('underscore')

View file

@ -1,4 +1,4 @@
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const FileStoreHandler = require('./FileStoreHandler')
const ProjectLocator = require('../Project/ProjectLocator')

View file

@ -1,5 +1,5 @@
const _ = require('underscore')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const fs = require('fs')
const request = require('request')
const settings = require('@overleaf/settings')

View file

@ -1,7 +1,7 @@
const RedisWrapper = require('../../infrastructure/RedisWrapper')
const rclient = RedisWrapper.client('health_check')
const settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const UserGetter = require('../User/UserGetter')
const {
SmokeTestFailure,

View file

@ -1,7 +1,7 @@
let HistoryController
const OError = require('@overleaf/o-error')
const async = require('async')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const request = require('request')
const settings = require('@overleaf/settings')
const SessionManager = require('../Authentication/SessionManager')

View file

@ -14,7 +14,7 @@ let InactiveProjectManager
const OError = require('@overleaf/o-error')
const async = require('async')
const _ = require('underscore')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const DocstoreManager = require('../Docstore/DocstoreManager')
const ProjectGetter = require('../Project/ProjectGetter')
const ProjectUpdateHandler = require('../Project/ProjectUpdateHandler')

View file

@ -1,5 +1,5 @@
const OError = require('@overleaf/o-error')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const metrics = require('@overleaf/metrics')
const settings = require('@overleaf/settings')
const request = require('requestretry')

View file

@ -17,7 +17,7 @@ const SessionManager = require('../Authentication/SessionManager')
const EditorController = require('../Editor/EditorController')
const ProjectLocator = require('../Project/ProjectLocator')
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const _ = require('underscore')
const LinkedFilesHandler = require('./LinkedFilesHandler')
const {

View file

@ -15,7 +15,7 @@ let MetaController
const OError = require('@overleaf/o-error')
const EditorRealTimeController = require('../Editor/EditorRealTimeController')
const MetaHandler = require('./MetaHandler')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
module.exports = MetaController = {
getMetadata(req, res, next) {

View file

@ -1,5 +1,5 @@
const { callbackify } = require('util')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const Settings = require('@overleaf/settings')
const crypto = require('crypto')
const Mailchimp = require('mailchimp-api-v3')

View file

@ -1,6 +1,6 @@
const settings = require('@overleaf/settings')
const request = require('request')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const _ = require('lodash')
const notificationsApi = _.get(settings, ['apis', 'notifications', 'url'])

View file

@ -12,7 +12,7 @@
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const ProjectDetailsHandler = require('./ProjectDetailsHandler')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
module.exports = {
getProjectDetails(req, res, next) {

View file

@ -4,7 +4,7 @@ const OError = require('@overleaf/o-error')
const fs = require('fs')
const crypto = require('crypto')
const async = require('async')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const { ObjectId } = require('mongodb')
const ProjectDeleter = require('./ProjectDeleter')
const ProjectDuplicator = require('./ProjectDuplicator')

View file

@ -1,4 +1,4 @@
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const OError = require('@overleaf/o-error')
const metrics = require('@overleaf/metrics')
const Settings = require('@overleaf/settings')

View file

@ -5,7 +5,7 @@ const { callbackify } = require('util')
const { Project } = require('../../models/Project')
const { DeletedProject } = require('../../models/DeletedProject')
const Errors = require('../Errors/Errors')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const DocumentUpdaterHandler = require('../DocumentUpdater/DocumentUpdaterHandler')
const TagsHandler = require('../Tags/TagsHandler')
const ProjectHelper = require('./ProjectHelper')

View file

@ -2,7 +2,7 @@ const _ = require('underscore')
const ProjectGetter = require('./ProjectGetter')
const UserGetter = require('../User/UserGetter')
const { Project } = require('../../models/Project')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const TpdsUpdateSender = require('../ThirdPartyDataStore/TpdsUpdateSender')
const PublicAccessLevels = require('../Authorization/PublicAccessLevels')
const Errors = require('../Errors/Errors')

View file

@ -1,7 +1,7 @@
const { callbackify } = require('util')
const { callbackifyMultiResult } = require('../../util/promises')
const _ = require('underscore')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const path = require('path')
const { ObjectId } = require('mongodb')
const Settings = require('@overleaf/settings')

View file

@ -1,7 +1,7 @@
const _ = require('lodash')
const OError = require('@overleaf/o-error')
const async = require('async')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const Settings = require('@overleaf/settings')
const Path = require('path')
const fs = require('fs')

View file

@ -4,7 +4,7 @@ const OError = require('@overleaf/o-error')
const metrics = require('@overleaf/metrics')
const { promisifyAll } = require('../../util/promises')
const { Project } = require('../../models/Project')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const LockManager = require('../../infrastructure/LockManager')
const { DeletedProject } = require('../../models/DeletedProject')

View file

@ -15,7 +15,7 @@
*/
const { Project } = require('../../models/Project')
const ProjectDetailsHandler = require('./ProjectDetailsHandler')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const settings = require('@overleaf/settings')
const HistoryManager = require('../History/HistoryManager')
const ProjectEntityUpdateHandler = require('./ProjectEntityUpdateHandler')

View file

@ -1,5 +1,5 @@
const _ = require('underscore')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const async = require('async')
const ProjectGetter = require('./ProjectGetter')
const Errors = require('../Errors/Errors')

View file

@ -12,7 +12,7 @@
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const { Project } = require('../../models/Project')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
module.exports = {
markAsUpdated(projectId, lastUpdatedAt, lastUpdatedBy, callback) {

View file

@ -15,7 +15,7 @@
let PublishersGetter
const UserMembershipsHandler = require('../UserMembership/UserMembershipsHandler')
const UserMembershipEntityConfigs = require('../UserMembership/UserMembershipEntityConfigs')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const _ = require('underscore')
module.exports = PublishersGetter = {

View file

@ -11,7 +11,7 @@
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
let ReferencesController
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const ReferencesHandler = require('./ReferencesHandler')
const settings = require('@overleaf/settings')
const EditorRealTimeController = require('../Editor/EditorRealTimeController')

View file

@ -14,7 +14,7 @@
*/
let ReferencesHandler
const OError = require('@overleaf/o-error')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const request = require('request')
const settings = require('@overleaf/settings')
const Features = require('../../infrastructure/Features')

View file

@ -1,5 +1,5 @@
const { SamlLog } = require('../../models/SamlLog')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
function log(providerId, sessionId, data) {
try {

View file

@ -1,5 +1,5 @@
const RateLimiter = require('../../infrastructure/RateLimiter')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const SessionManager = require('../Authentication/SessionManager')
const LoginRateLimiter = require('./LoginRateLimiter')
const settings = require('@overleaf/settings')

View file

@ -16,7 +16,7 @@
*/
const metrics = require('@overleaf/metrics')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const _ = require('underscore')
const DocumentUpdaterHandler = require('../DocumentUpdater/DocumentUpdaterHandler')
const Settings = require('@overleaf/settings')

View file

@ -1,6 +1,6 @@
const request = require('request')
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const SessionManager = require('../Authentication/SessionManager')
const TEN_SECONDS = 1000 * 10

View file

@ -11,7 +11,7 @@
*/
let UniversityController
const settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const Settings = require('@overleaf/settings')
module.exports = UniversityController = {

View file

@ -6,7 +6,7 @@ const SubscriptionLocator = require('./SubscriptionLocator')
const UserFeaturesUpdater = require('./UserFeaturesUpdater')
const FeaturesHelper = require('./FeaturesHelper')
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const ReferalFeatures = require('../Referal/ReferalFeatures')
const V1SubscriptionManager = require('./V1SubscriptionManager')
const InstitutionsFeatures = require('../Institutions/InstitutionsFeatures')

View file

@ -1,5 +1,5 @@
const OError = require('@overleaf/o-error')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const ProjectGetter = require('../Project/ProjectGetter')
const UserGetter = require('../User/UserGetter')
const SubscriptionLocator = require('./SubscriptionLocator')

View file

@ -1,5 +1,5 @@
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
function ensurePlansAreSetupCorrectly() {
Settings.plans.forEach(plan => {

View file

@ -1,6 +1,6 @@
const recurly = require('recurly')
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const { callbackify } = require('util')
const UserGetter = require('../User/UserGetter')

View file

@ -21,7 +21,7 @@ const crypto = require('crypto')
const request = require('request')
const Settings = require('@overleaf/settings')
const xml2js = require('xml2js')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const Async = require('async')
const Errors = require('../Errors/Errors')
const SubscriptionErrors = require('./Errors')

View file

@ -5,7 +5,7 @@ const SubscriptionViewModelBuilder = require('./SubscriptionViewModelBuilder')
const LimitationsManager = require('./LimitationsManager')
const RecurlyWrapper = require('./RecurlyWrapper')
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const GeoIpLookup = require('../../infrastructure/GeoIpLookup')
const FeaturesUpdater = require('./FeaturesUpdater')
const planFeatures = require('./planFeatures')

View file

@ -13,7 +13,7 @@
*/
const SubscriptionGroupHandler = require('./SubscriptionGroupHandler')
const OError = require('@overleaf/o-error')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const SubscriptionLocator = require('./SubscriptionLocator')
const SessionManager = require('../Authentication/SessionManager')
const _ = require('underscore')

View file

@ -21,7 +21,7 @@ const SubscriptionLocator = require('./SubscriptionLocator')
const UserGetter = require('../User/UserGetter')
const { Subscription } = require('../../models/Subscription')
const LimitationsManager = require('./LimitationsManager')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const OneTimeTokenHandler = require('../Security/OneTimeTokenHandler')
const EmailHandler = require('../Email/EmailHandler')
const settings = require('@overleaf/settings')

View file

@ -3,7 +3,7 @@ const { promisify } = require('util')
const RecurlyWrapper = require('./RecurlyWrapper')
const RecurlyClient = require('./RecurlyClient')
const { User } = require('../../models/User')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const SubscriptionUpdater = require('./SubscriptionUpdater')
const LimitationsManager = require('./LimitationsManager')
const EmailHandler = require('../Email/EmailHandler')

View file

@ -15,7 +15,7 @@
const { promisify } = require('util')
const { Subscription } = require('../../models/Subscription')
const { DeletedSubscription } = require('../../models/DeletedSubscription')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
require('./GroupPlansData') // make sure dynamic group plans are loaded
const SubscriptionLocator = {

View file

@ -7,7 +7,7 @@ const FeaturesUpdater = require('./FeaturesUpdater')
const FeaturesHelper = require('./FeaturesHelper')
const AnalyticsManager = require('../Analytics/AnalyticsManager')
const { DeletedSubscription } = require('../../models/DeletedSubscription')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
/**
* Change the admin of the given subscription.

View file

@ -11,7 +11,7 @@
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const TeamInvitesHandler = require('./TeamInvitesHandler')
const SessionManager = require('../Authentication/SessionManager')
const SubscriptionLocator = require('./SubscriptionLocator')

View file

@ -1,5 +1,5 @@
let TeamInvitesHandler
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const crypto = require('crypto')
const async = require('async')

View file

@ -16,7 +16,7 @@ const path = require('path')
const SessionManager = require('../Authentication/SessionManager')
const TemplatesManager = require('./TemplatesManager')
const ProjectHelper = require('../Project/ProjectHelper')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
module.exports = TemplatesController = {
getV1Template(req, res) {

View file

@ -20,7 +20,7 @@ const FileWriter = require('../../infrastructure/FileWriter')
const async = require('async')
const fs = require('fs')
const util = require('util')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const request = require('request')
const requestPromise = require('request-promise-native')
const settings = require('@overleaf/settings')

View file

@ -9,7 +9,7 @@
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
module.exports = {
saveTemplateDataInSession(req, res, next) {

View file

@ -3,7 +3,7 @@ let parseParams
const TpdsUpdateHandler = require('./TpdsUpdateHandler')
const UpdateMerger = require('./UpdateMerger')
const Errors = require('../Errors/Errors')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const Path = require('path')
const metrics = require('@overleaf/metrics')
const NotificationsBuilder = require('../Notifications/NotificationsBuilder')

View file

@ -1,5 +1,5 @@
const { callbackify } = require('util')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const DocumentUpdaterHandler = require('../DocumentUpdater/DocumentUpdaterHandler')
const ProjectGetter = require('../Project/ProjectGetter')
const ProjectEntityHandler = require('../Project/ProjectEntityHandler')

View file

@ -1,5 +1,5 @@
const UpdateMerger = require('./UpdateMerger')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const NotificationsBuilder = require('../Notifications/NotificationsBuilder')
const ProjectCreationHandler = require('../Project/ProjectCreationHandler')
const ProjectDeleter = require('../Project/ProjectDeleter')

View file

@ -1,7 +1,7 @@
const { ObjectId } = require('mongodb')
const _ = require('lodash')
const { callbackify } = require('util')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const metrics = require('@overleaf/metrics')
const path = require('path')
const request = require('request-promise-native')

View file

@ -16,7 +16,7 @@ const OError = require('@overleaf/o-error')
const _ = require('underscore')
const async = require('async')
const fs = require('fs')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const EditorController = require('../Editor/EditorController')
const FileTypeManager = require('../Uploads/FileTypeManager')
const FileWriter = require('../../infrastructure/FileWriter')

View file

@ -2,7 +2,7 @@ const AuthenticationController = require('../Authentication/AuthenticationContro
const SessionManager = require('../Authentication/SessionManager')
const TokenAccessHandler = require('./TokenAccessHandler')
const Errors = require('../Errors/Errors')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const settings = require('@overleaf/settings')
const OError = require('@overleaf/o-error')
const { expressify } = require('../../util/promises')

View file

@ -3,7 +3,7 @@ const PublicAccessLevels = require('../Authorization/PublicAccessLevels')
const PrivilegeLevels = require('../Authorization/PrivilegeLevels')
const { ObjectId } = require('mongodb')
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const V1Api = require('../V1/V1Api')
const crypto = require('crypto')
const { promisifyAll } = require('../../util/promises')

View file

@ -12,7 +12,7 @@
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const OError = require('@overleaf/o-error')
const metrics = require('@overleaf/metrics')
const fs = require('fs')

View file

@ -5,7 +5,7 @@ const EditorController = require('../Editor/EditorController')
const Errors = require('../Errors/Errors')
const FileTypeManager = require('./FileTypeManager')
const SafePath = require('../Project/SafePath')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
module.exports = {
addEntity: callbackify(addEntity),

View file

@ -12,7 +12,7 @@
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
let ProjectUploadController
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const metrics = require('@overleaf/metrics')
const fs = require('fs')
const Path = require('path')

View file

@ -14,7 +14,7 @@ const ProjectRootDocManager = require('../Project/ProjectRootDocManager')
const ProjectDetailsHandler = require('../Project/ProjectDetailsHandler')
const ProjectDeleter = require('../Project/ProjectDeleter')
const TpdsProjectFlusher = require('../ThirdPartyDataStore/TpdsProjectFlusher')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
module.exports = {
createProjectFromZipArchive: callbackify(createProjectFromZipArchive),

View file

@ -8,7 +8,7 @@ const SubscriptionLocator = require('../Subscription/SubscriptionLocator')
const UserAuditLogHandler = require('../User/UserAuditLogHandler')
const UserGetter = require('../User/UserGetter')
const UserUpdater = require('../User/UserUpdater')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const { User } = require('../../models/User')
async function _addAuditLogEntry(

View file

@ -4,7 +4,7 @@ const EmailHandler = require(`${APP_ROOT}/Features/Email/EmailHandler`)
const EmailOptionsHelper = require(`${APP_ROOT}/Features/Email/EmailOptionsHelper`)
const Errors = require('../Errors/Errors')
const _ = require('lodash')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const OError = require('@overleaf/o-error')
const settings = require('@overleaf/settings')
const { User } = require(`${APP_ROOT}/models/User`)

View file

@ -4,7 +4,7 @@ const UserGetter = require('./UserGetter')
const { User } = require('../../models/User')
const NewsletterManager = require('../Newsletter/NewsletterManager')
const UserRegistrationHandler = require('./UserRegistrationHandler')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const metrics = require('@overleaf/metrics')
const AuthenticationManager = require('../Authentication/AuthenticationManager')
const SessionManager = require('../Authentication/SessionManager')

View file

@ -1,4 +1,4 @@
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const util = require('util')
const { AffiliationError } = require('../Errors/Errors')
const Features = require('../../infrastructure/Features')

View file

@ -1,5 +1,5 @@
const { callbackify } = require('util')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const moment = require('moment')
const { User } = require('../../models/User')
const { DeletedUser } = require('../../models/DeletedUser')

View file

@ -1,4 +1,4 @@
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const SessionManager = require('../Authentication/SessionManager')
const UserGetter = require('./UserGetter')
const UserUpdater = require('./UserUpdater')

View file

@ -1,7 +1,7 @@
const { callbackify } = require('util')
const { db } = require('../../infrastructure/mongodb')
const metrics = require('@overleaf/metrics')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const moment = require('moment')
const settings = require('@overleaf/settings')
const { promisifyAll } = require('../../util/promises')

View file

@ -1,7 +1,7 @@
const UserGetter = require('./UserGetter')
const OError = require('@overleaf/o-error')
const UserSessionsManager = require('./UserSessionsManager')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const Settings = require('@overleaf/settings')
const AuthenticationController = require('../Authentication/AuthenticationController')
const SessionManager = require('../Authentication/SessionManager')

View file

@ -4,7 +4,7 @@ const UserGetter = require('./UserGetter')
const AuthenticationManager = require('../Authentication/AuthenticationManager')
const NewsletterManager = require('../Newsletter/NewsletterManager')
const async = require('async')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const crypto = require('crypto')
const EmailHandler = require('../Email/EmailHandler')
const OneTimeTokenHandler = require('../Security/OneTimeTokenHandler')

View file

@ -1,6 +1,6 @@
const OError = require('@overleaf/o-error')
const Settings = require('@overleaf/settings')
const logger = require('logger-sharelatex')
const logger = require('@overleaf/logger')
const Async = require('async')
const _ = require('underscore')
const { promisify } = require('util')

Some files were not shown because too many files have changed in this diff Show more